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 +};