From 5091ad43007b8003c0be5d9246bfe0967ece4732 Mon Sep 17 00:00:00 2001 From: Yuikill <105910874+Yuikill@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:24:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0=E4=B8=8E?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E4=B8=BA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E7=BB=9D=E5=AF=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84--story=3D116108765=20(#2937)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bcs-services/bcs-bscp/ui/src/i18n/en-us.ts | 3 +- bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts | 3 +- .../config-table-list/config-form.vue | 64 +++++++------------ .../create-config/manual-create.vue | 3 - .../tables/table-with-templates.vue | 19 ++++-- .../tables/common-config-table.vue | 16 +++-- bcs-services/bcs-bscp/ui/types/config.ts | 1 + 7 files changed, 52 insertions(+), 57 deletions(-) diff --git a/bcs-services/bcs-bscp/ui/src/i18n/en-us.ts b/bcs-services/bcs-bscp/ui/src/i18n/en-us.ts index 950db0f640..67b1b20674 100644 --- a/bcs-services/bcs-bscp/ui/src/i18n/en-us.ts +++ b/bcs-services/bcs-bscp/ui/src/i18n/en-us.ts @@ -104,7 +104,8 @@ export default { 批量上传: 'Bulk Upload', 从配置模板导入: 'Import from Configuration Template', 批量导入: 'Bulk Import', - 配置文件名称: 'Configuration file name', + 配置文件绝对路径: 'Absolute path to the configuration file', + 请输入配置文件的绝对路径: 'Please enter the absolute path to the configuration file', '请输入1~64个字符,只允许英文、数字、下划线、中划线或点': 'Please enter 1 to 64 characters, only allowing alphabets, numbers, underscores, hyphens, or dots.', 配置文件路径: 'Configuration file path', '客户端拉取配置文件后存放路径为:临时目录/业务ID/服务名称/files/配置文件路径,除了配置文件路径其它参数都在客户端sidecar中配置': 'The path for storing the configuration file after the client retrieves it is: temporary directory/business ID/service name/files/configuration file path. Except for the configuration file path, all other parameters are configured in the client sidecar', diff --git a/bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts b/bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts index c8066a4d1e..319ca6521b 100644 --- a/bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts +++ b/bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts @@ -104,7 +104,8 @@ export default { 批量上传: '批量上传', 从配置模板导入: '从配置模板导入', 批量导入: '批量导入', - 配置文件名称: '配置文件名称', + 配置文件绝对路径: '配置文件绝对路径', + 请输入配置文件的绝对路径: '请输入配置文件的绝对路径', '请输入1~64个字符,只允许英文、数字、下划线、中划线或点': '请输入1~64个字符,只允许英文、数字、下划线、中划线或点', 配置文件路径: '配置文件路径', '客户端拉取配置文件后存放路径为:临时目录/业务ID/服务名称/files/配置文件路径,除了配置文件路径其它参数都在客户端sidecar中配置': '客户端拉取配置文件后存放路径为:临时目录/业务ID/服务名称/files/配置文件路径,除了配置文件路径其它参数都在客户端sidecar中配置', diff --git a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/config-form.vue b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/config-form.vue index 7537de7ec4..36e746eba8 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/config-form.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/config-form.vue @@ -1,25 +1,7 @@ - {{ config.name }} + {{ fileAP(config) }} {{ config.versionName }} - {{ config.path }} {{ config.creator }} {{ config.reviser }} {{ config.update_at }} @@ -308,6 +306,15 @@ // 是否为未命名版本 const isUnNamedVersion = computed(() => versionData.value.id === 0); + // 配置文件绝对路径 + const fileAP = computed(() => (config: IConfigTableItem) => { + const { path, name } = config; + if (path.endsWith('/')) { + return `${path}${name}`; + } + return `${path}/${name}`; + }); + watch( () => versionData.value.id, async () => { diff --git a/bcs-services/bcs-bscp/ui/src/views/space/templates/list/package-detail/tables/common-config-table.vue b/bcs-services/bcs-bscp/ui/src/views/space/templates/list/package-detail/tables/common-config-table.vue index 938f2462db..dab98b0b72 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/templates/list/package-detail/tables/common-config-table.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/templates/list/package-detail/tables/common-config-table.vue @@ -30,14 +30,13 @@ @selection-change="handleSelectionChange" @select-all="handleSelectAll"> - + -