From 05dac2b50460907338d3ccff9756102002d65593 Mon Sep 17 00:00:00 2001 From: q15971095971 <764419406@qq.com> Date: Fri, 27 Sep 2024 19:37:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E9=85=8D=E7=BD=AE=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E6=96=B0=E5=A2=9E=20=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD--story=3D11969773?= =?UTF-8?q?7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/components/associate-config.vue | 219 ++++++++++++++++++ .../example/components/content/kv-example.vue | 2 +- .../components/content/node-mana-example.vue | 2 +- .../client/example/components/form-option.vue | 8 + .../associate-config-items/index.vue | 85 ++++--- .../associate-config-items/rule-edit.vue | 53 ++++- 6 files changed, 330 insertions(+), 39 deletions(-) create mode 100644 bcs-services/bcs-bscp/ui/src/views/space/client/example/components/associate-config.vue diff --git a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/associate-config.vue b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/associate-config.vue new file mode 100644 index 0000000000..fe5728d488 --- /dev/null +++ b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/associate-config.vue @@ -0,0 +1,219 @@ + + + + diff --git a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/kv-example.vue b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/kv-example.vue index 66cc5fcb88..209f75db4e 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/kv-example.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/kv-example.vue @@ -77,7 +77,7 @@ const kvConfig = computed(() => { // @ts-ignore // eslint-disable-next-line - const url = BSCP_CONFIG.python_sdk_dependency_doc; + const url = (typeof BSCP_CONFIG !== 'undefined' && BSCP_CONFIG.python_sdk_dependency_doc) || ''; switch (props.kvName) { case 'python': // get diff --git a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/node-mana-example.vue b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/node-mana-example.vue index 88465ab9ed..a7dd1365ff 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/node-mana-example.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/content/node-mana-example.vue @@ -102,7 +102,7 @@ nodeManaUrl: `${(window as any).BK_NODE_HOST}/#/plugin-manager/rule`, // @ts-ignore // eslint-disable-next-line - clientNode: BSCP_CONFIG.client_configuration_doc, + clientNode: (typeof BSCP_CONFIG !== 'undefined' && BSCP_CONFIG.client_configuration_doc) || '', }; const keyValidateReg = new RegExp( diff --git a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/form-option.vue b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/form-option.vue index 4a09107f03..50b63d994c 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/form-option.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/client/example/components/form-option.vue @@ -76,6 +76,11 @@ :required="formData.clusterSwitch"> + + + + + @@ -92,6 +97,7 @@ import { cloneDeep } from 'lodash'; import { copyToClipBoard } from '../../../../../utils/index'; import BkMessage from 'bkui-vue/lib/message'; + import associateConfig from './associate-config.vue'; const props = withDefaults( defineProps<{ @@ -99,12 +105,14 @@ labelName?: string; p2pShow?: boolean; httpConfigShow?: boolean; + associateConfigShow?: boolean; }>(), { directoryShow: true, labelName: '标签', p2pShow: false, httpConfigShow: false, + associateConfigShow: true, }, ); diff --git a/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue b/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue index 3e82461880..ff45a2e4e5 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue @@ -1,14 +1,19 @@