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 74fdd2d514..efd5d5a39e 100644 --- a/bcs-services/bcs-bscp/ui/src/i18n/en-us.ts +++ b/bcs-services/bcs-bscp/ui/src/i18n/en-us.ts @@ -90,7 +90,7 @@ export default { 版本日志: 'Release Notes', 功能特性: 'Features', 问题反馈: 'Feedback', - 退出登录: 'Sign out', + 退出登录: 'Sign Out', 新建业务: 'New Business Creation', 模板与变量: 'Templates and Variables', 模板管理: 'Template Management', diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/components/internal-variable.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/components/internal-variable.vue index d272d974b9..afb9c3eef9 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/components/internal-variable.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/components/internal-variable.vue @@ -31,32 +31,36 @@ { cnName: t('配置根目录'), shellVar: '${bk_bscp_temp_dir}', - pythonVar: 'os.environ.get( \'bk_bscp_temp_dir\' )', + pythonVar: "os.environ.get( 'bk_bscp_temp_dir' )", batVar: '%bk_bscp_temp_dir%', + PSVar: '$env:bk_bscp_temp_dir', tips: t('客户端配置的配置存放临时目录,默认值为 {n}', { n: ' /data/bscp' }), - batTips: t('客户端配置的配置存放临时目录,默认值为 {n}', { n: ' C:\\data\\bscp' }) + batTips: t('客户端配置的配置存放临时目录,默认值为 {n}', { n: ' C:\\data\\bscp' }), }, { cnName: t('业务ID'), shellVar: '${bk_bscp_biz}', - pythonVar: 'os.environ.get( \'bk_bscp_biz\' )', + pythonVar: "os.environ.get( 'bk_bscp_biz' )", batVar: '%bk_bscp_biz%', + PSVar: '$env:bk_bscp_biz', tips: t('蓝鲸配置平台上的业务ID,例如:2'), batTips: t('蓝鲸配置平台上的业务ID,例如:2'), }, { cnName: t('服务名称'), shellVar: '${bk_bscp_app}', - pythonVar: 'os.environ.get( \'bk_bscp_app\' )', + pythonVar: "os.environ.get( 'bk_bscp_app' )", batVar: '%bk_bscp_app%', + PSVar: '$env:bk_bscp_app', tips: t('服务配置中心上的服务名称,例如:demo_service'), batTips: t('服务配置中心上的服务名称,例如:demo_service'), }, { cnName: t('服务配置目录'), shellVar: '${bk_bscp_app_temp_dir}', - pythonVar: 'os.environ.get( \'bk_bscp_app_temp_dir\' )', + pythonVar: "os.environ.get( 'bk_bscp_app_temp_dir' )", batVar: '%bk_bscp_app_temp_dir%', + PSVar: '$env:bk_bscp_app_temp_dir', tips: t( '单个客户端可使用多个服务的配置,为保证路径唯一,服务配置需存放于:配置根目录/业务ID/服务名称,服务配置存放目录 = 配置存放根目录/业务ID/服务名称', ), @@ -67,8 +71,9 @@ { cnName: t('当前配置版本名称'), shellVar: '${bk_bscp_current_version_name}', - pythonVar: 'os.environ.get( \'bk_bscp_current_version_name\' )', + pythonVar: "os.environ.get( 'bk_bscp_current_version_name' )", batVar: '%bk_bscp_current_version_name%', + PSVar: '$env:bk_bscp_current_version_name', tips: t( '当前客户端最近一次成功拉取的服务配置版本名称,如 V1,通常会在后置脚本中为服务配置版本添加标识,以表示配置文件已经完成拉取', ), @@ -94,12 +99,15 @@ }; const getVar = (item: any) => { - if (props.language === 'shell' || props.language === 'powershell') { + if (props.language === 'shell') { return item.shellVar; } if (props.language === 'python') { return item.pythonVar; } + if (props.language === 'powershell') { + return item.PSVar; + } return item.batVar; }; diff --git a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/create-config/manual-create.vue b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/create-config/manual-create.vue index 54af02e56d..02b391afdb 100644 --- a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/create-config/manual-create.vue +++ b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/config/config-list/config-table-list/create-config/manual-create.vue @@ -104,6 +104,9 @@ size = new Blob([stringContent]).size; await updateConfigContent(props.bkBizId, props.appId, stringContent, sign, () => {}); } + if (configForm.value.path?.endsWith('/') && configForm.value.path !== '/') { + configForm.value.path = configForm.value.path.slice(0, -1); + } const params = { ...configForm.value, ...{ sign, byte_size: size } }; const res = await createServiceConfigItem(props.appId, props.bkBizId, params); serviceStore.$patch((state) => {