From f817d7caeb1ed169bfcfdbe0170a7602c10ce4cd Mon Sep 17 00:00:00 2001 From: royalpioneer Date: Fri, 6 Dec 2024 12:19:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20tendbcluster=E3=80=81doris?= =?UTF-8?q?=E7=9A=84tab=E7=BC=BA=E5=A4=B1=20#8175=20#=20Reviewed,=20transa?= =?UTF-8?q?ction=20id:=2026055?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/list/components/Content.vue | 12 ++++++++++++ .../views/db-configure/components/DetailsBase.vue | 6 ++++++ dbm-ui/frontend/src/views/db-configure/routes.ts | 8 ++++++++ .../db-manage/tendb-cluster/apply/CreateModule.vue | 11 ++++++++++- .../views/service-apply/create-db-module/Index.vue | 11 ++++++++++- .../create-db-module/SqlServerCreateDbModule.vue | 3 +++ 6 files changed, 49 insertions(+), 2 deletions(-) diff --git a/dbm-ui/frontend/src/views/db-configure/business/list/components/Content.vue b/dbm-ui/frontend/src/views/db-configure/business/list/components/Content.vue index b162323bb1..ee2b90ca7a 100644 --- a/dbm-ui/frontend/src/views/db-configure/business/list/components/Content.vue +++ b/dbm-ui/frontend/src/views/db-configure/business/list/components/Content.vue @@ -197,6 +197,10 @@ type: ticketTypeMap[clusterType.value], bk_biz_id: window.PROJECT_CONFIG.BIZ_ID, }, + query: { + from: String(route.name), + clusterType: clusterType.value, + }, }); } else if ([ClusterTypes.SQLSERVER_SINGLE, ClusterTypes.SQLSERVER_HA].includes(clusterType.value)) { router.push({ @@ -205,6 +209,10 @@ ticketType: ticketTypeMap[clusterType.value], bizId: window.PROJECT_CONFIG.BIZ_ID, }, + query: { + from: String(route.name), + clusterType: clusterType.value, + }, }); } else { router.push({ @@ -212,6 +220,10 @@ params: { bizId: window.PROJECT_CONFIG.BIZ_ID, }, + query: { + from: String(route.name), + clusterType: clusterType.value, + }, }); } }; diff --git a/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue b/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue index ba051fc053..7cbd9229c5 100644 --- a/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue +++ b/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue @@ -229,6 +229,12 @@ ], ); } + if (state.version) { + baseColumns[0].push({ + label: t('Spider版本'), + render: () => state.data.version, + }); + } return baseColumns; }); const detailData = computed(() => { diff --git a/dbm-ui/frontend/src/views/db-configure/routes.ts b/dbm-ui/frontend/src/views/db-configure/routes.ts index aff658b2bc..c7540f7439 100644 --- a/dbm-ui/frontend/src/views/db-configure/routes.ts +++ b/dbm-ui/frontend/src/views/db-configure/routes.ts @@ -80,6 +80,14 @@ const routes: RouteRecordRaw[] = [ }, component: () => import('@views/db-manage/tendb-cluster/apply/CreateModule.vue'), }, + { + name: 'SqlServerCreateDbModule', + path: 'sqlserver-create-db-module/:ticketType/:bizId/', + meta: { + navName: t('新建模块'), + }, + component: () => import('@views/service-apply/create-db-module/SqlServerCreateDbModule.vue'), + }, ], }, ]; diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/apply/CreateModule.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/apply/CreateModule.vue index c738fb18fb..44f1a8fecc 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/apply/CreateModule.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/apply/CreateModule.vue @@ -355,8 +355,17 @@ defineExpose({ routerBack() { + if (!route.query.from) { + router.push({ + name: 'serviceApply', + }); + return; + } router.push({ - name: 'DbConfigureList', + name: String(route.query.from), + params: { + clusterType: route.query.clusterType as string, + }, }); }, }); diff --git a/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue b/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue index 8a03d7ee17..ccb4be9321 100644 --- a/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue +++ b/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue @@ -463,8 +463,17 @@ defineExpose({ routerBack() { + if (!route.query.from) { + router.push({ + name: 'serviceApply', + }); + return; + } router.push({ - name: 'DbConfigureList', + name: String(route.query.from), + params: { + clusterType: route.query.clusterType as string, + }, }); }, }); diff --git a/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue b/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue index 6838a95ad0..5ca820533e 100644 --- a/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue +++ b/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue @@ -383,6 +383,9 @@ } router.push({ name: String(route.query.from), + params: { + clusterType: route.query.clusterType as string, + }, }); }, });