From 6d680c46cad81b9c0c0730aeaff8e38adb3ab007 Mon Sep 17 00:00:00 2001 From: Yuikill <1191184301@qq.com> Date: Fri, 27 Oct 2023 17:54:59 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0=E8=B7=B3?= =?UTF-8?q?=E8=BD=ACCMDB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bcs-services/bcs-bscp/ui/index.html | 1 + .../bcs-bscp/ui/src/components/head.vue | 32 ++++++++++++++++--- .../views/space/variables/editing-form.vue | 5 +-- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/bcs-services/bcs-bscp/ui/index.html b/bcs-services/bcs-bscp/ui/index.html index 5d5451bd6e..9fc1581392 100644 --- a/bcs-services/bcs-bscp/ui/index.html +++ b/bcs-services/bcs-bscp/ui/index.html @@ -9,6 +9,7 @@ var BK_BCS_BSCP_API = '{{ .BK_BCS_BSCP_API }}' var SITE_URL = '{{ .SITE_URL }}' var BK_IAM_HOST = '{{ .BK_IAM_HOST }}' + var BK_CC_HOST = '{{ .BK_CC_HOST }}' window.BSCP_CONFIG = JSON.parse('{{ .BK_BSCP_CONFIG }}') diff --git a/bcs-services/bcs-bscp/ui/src/components/head.vue b/bcs-services/bcs-bscp/ui/src/components/head.vue index f5346120c0..f32946c574 100644 --- a/bcs-services/bcs-bscp/ui/src/components/head.vue +++ b/bcs-services/bcs-bscp/ui/src/components/head.vue @@ -35,6 +35,12 @@ +
([]); const crtSpaceText = computed(() => { - const space = spaceList.value.find((item) => item.space_id === spaceId.value); + const space = spaceList.value.find(item => item.space_id === spaceId.value); if (space) { return `${space.space_name}(${spaceId.value})`; } @@ -135,7 +141,7 @@ watch( }, { immediate: true, - } + }, ); const handleSpaceSearch = (searchStr: string) => { @@ -174,7 +180,7 @@ const handleSelectSpace = (id: string) => { state.currentTemplateSpace = 0; state.currentPkg = ''; }); - const nav = navList.find((item) => item.module === route.meta.navModule); + const nav = navList.find(item => item.module === route.meta.navModule); if (nav) { router.push({ name: nav.id, params: { spaceId: id } }); } else { @@ -242,6 +248,10 @@ Object.keys(module).forEach((path) => { const handleLoginOut = () => { loginOut(); }; +const handleToCMDB = () => { + // @ts-ignore + window.open(BK_CC_HOST); // eslint-disable-line no-undef +};