From 22472b2ffafab0dfad1e3cbcf2c2cc98962fd51d Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Mon, 25 Nov 2024 16:00:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20mysql=20=E3=80=81tendbcluster?= =?UTF-8?q?=E7=9A=84dbmodule=E6=B7=BB=E5=8A=A0alias=5Fname=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20#8103?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/services/source/cmdb.ts | 8 ++++++- .../frontend/src/services/source/ticket.tsx | 20 ++++++++--------- .../business/list/components/ConfigEmpty.vue | 2 +- .../mongodb/replica-set-apply/Index.vue | 2 +- .../mongodb/shared-cluster-apply/Index.vue | 2 +- .../db-manage/mysql/apply/ApplyMySQL.vue | 22 +++++++++---------- .../mysql/apply/components/BatchEdit.vue | 12 +++++----- .../apply/components/MySQLDomainTable.vue | 12 +++++----- .../page1/components/RenderTargetVersion.vue | 2 +- .../RenderTargetVersion.vue | 4 ++-- .../src/views/db-manage/riak/apply/Index.vue | 6 ++--- .../db-manage/sqlserver/apply/SqlServer.vue | 14 ++++++------ .../sqlserver/apply/components/BatchEdit.vue | 6 ++--- .../apply/components/DomainTable.vue | 14 ++++++------ .../tendb-cluster/apply/CreateModule.vue | 15 ++++++++----- .../db-manage/tendb-cluster/apply/Index.vue | 2 +- .../apply/components/ModuleItem.vue | 4 ++-- .../useSpiderClusterData.ts | 2 +- .../service-apply/create-db-module/Index.vue | 17 ++++++++------ .../SqlServerCreateDbModule.vue | 13 ++++++----- .../spider/TargetClusterPreview.vue | 2 +- 21 files changed, 97 insertions(+), 84 deletions(-) diff --git a/dbm-ui/frontend/src/services/source/cmdb.ts b/dbm-ui/frontend/src/services/source/cmdb.ts index 45dcb35123..b680c6fcc3 100644 --- a/dbm-ui/frontend/src/services/source/cmdb.ts +++ b/dbm-ui/frontend/src/services/source/cmdb.ts @@ -45,7 +45,12 @@ export function getBizs(params = {} as { action: string }) { /** * 创建数据库模块 */ -export function createModules(params: { db_module_name: string; cluster_type: string; biz_id: number }) { +export function createModules(params: { + db_module_name: string; + alias_name: string; + cluster_type: string; + biz_id: number; +}) { return http.post<{ db_module_id: number; db_module_name: string; @@ -82,6 +87,7 @@ export function getUserGroupList(params: { bk_biz_id: number }) { export function getModules(params: { bk_biz_id: number; cluster_type: string }) { return http.get< { + alias_name: string; bk_biz_id: number; db_module_id: number; name: string; diff --git a/dbm-ui/frontend/src/services/source/ticket.tsx b/dbm-ui/frontend/src/services/source/ticket.tsx index 37cd86b36d..7e06245d0f 100644 --- a/dbm-ui/frontend/src/services/source/ticket.tsx +++ b/dbm-ui/frontend/src/services/source/ticket.tsx @@ -389,16 +389,16 @@ export const createAppAbbr = (params: { db_app_abbr: string; id: number }) => /** * 创建模块 */ -export const createModules = (params: { db_module_name: string; cluster_type: string; id: number }) => - http.post<{ - db_module_id: number; - db_module_name: string; - cluster_type: string; - bk_biz_id: number; - bk_set_id: number; - bk_modules: { bk_module_name: string; bk_module_id: string }[]; - name: string; - }>(`/apis/cmdb/${params.id}/create_module/`, params); +// export const createModules = (params: { db_module_name: string; cluster_type: string; id: number }) => +// http.post<{ +// db_module_id: number; +// db_module_name: string; +// cluster_type: string; +// bk_biz_id: number; +// bk_set_id: number; +// bk_modules: { bk_module_name: string; bk_module_id: string }[]; +// name: string; +// }>(`/apis/cmdb/${params.id}/create_module/`, params); /** * 保存模块配置 diff --git a/dbm-ui/frontend/src/views/db-configure/business/list/components/ConfigEmpty.vue b/dbm-ui/frontend/src/views/db-configure/business/list/components/ConfigEmpty.vue index 0203051ba2..2b28a3ef2d 100644 --- a/dbm-ui/frontend/src/views/db-configure/business/list/components/ConfigEmpty.vue +++ b/dbm-ui/frontend/src/views/db-configure/business/list/components/ConfigEmpty.vue @@ -63,7 +63,7 @@ bk_biz_id: globalBizsStore.currentBizId, db_module_id: id, }, - query: { module_name: name }, + query: { alias_name: name }, }); }; diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-apply/Index.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-apply/Index.vue index 50e76015af..cb5aefe0d9 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-apply/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-apply/Index.vue @@ -391,7 +391,7 @@ .apply-instance { :deep(.item-input) { - width: 462px; + width: 435px; } .input-desc { diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-apply/Index.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-apply/Index.vue index 9239c01213..7a2939a44d 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-apply/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-apply/Index.vue @@ -414,7 +414,7 @@ } :deep(.item-input) { - width: 462px; + width: 435px; } .resource-pool-item { diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/apply/ApplyMySQL.vue b/dbm-ui/frontend/src/views/db-manage/mysql/apply/ApplyMySQL.vue index fbc6b4844a..23ec7ee51e 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/apply/ApplyMySQL.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/apply/ApplyMySQL.vue @@ -46,7 +46,7 @@ :key="item.db_module_id" action-id="dbconfig_view" :biz-id="formdata.bk_biz_id" - :name="item.name" + :name="item.alias_name" :permission="item.permission.dbconfig_view" resource="mysql" />