Skip to content

Commit

Permalink
feat: 服务管理页面添加“配置客户端”引导--story=119561674 (#3502)
Browse files Browse the repository at this point in the history
* fix: 配置文件绝对路径问题优化

* fix: 顶栏下拉框国际化内容调整

* feat: 服务管理页面添加“配置客户端”引导
  • Loading branch information
Yuikill authored and AlkaidChan committed Sep 25, 2024
1 parent da7d434 commit 247b59f
Show file tree
Hide file tree
Showing 26 changed files with 273 additions and 142 deletions.
4 changes: 2 additions & 2 deletions bcs-services/bcs-bscp/ui/src/components/head.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</bk-popover>
<bk-dropdown trigger="hover" ext-cls="dropdown" :is-show="isShowDropdown" @hide="isShowDropdown = false">
<bk-button text :class="['dropdown-trigger', isShowDropdown ? 'active' : '']">
<help-fill width="16" height="16" :fill="isShowDropdown ? '#fff' : '#96a2b9'" />
<help-document-fill width="16" height="16" :fill="isShowDropdown ? '#fff' : '#96a2b9'" />
</bk-button>
<template #content>
<bk-dropdown-menu ext-cls="dropdown-menu">
Expand Down Expand Up @@ -119,7 +119,7 @@
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter, RouteRecordName } from 'vue-router';
import { storeToRefs } from 'pinia';
import { AngleDown, HelpFill, DownShape, Plus } from 'bkui-vue/lib/icon';
import { AngleDown, HelpDocumentFill, DownShape, Plus } from 'bkui-vue/lib/icon';
import useGlobalStore from '../store/global';
import useUserStore from '../store/user';
import useTemplateStore from '../store/template';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<bk-table-column label="配置文件名称">
<bk-table-column label="配置文件名">
<bk-checkbox></bk-checkbox>
aaa
</bk-table-column>
Expand Down
4 changes: 2 additions & 2 deletions bcs-services/bcs-bscp/ui/src/components/version-log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<slot>
<span class="item-title">{{ item.title }}</span>
<span class="item-date">{{ item.date }}</span>
<span v-if="index === 0" :class="['item-current', { en: locale === 'en' }]">{{ t('当前版本') }}</span>
<span v-if="index === 0" class="item-current">{{ t('当前版本') }}</span>
</slot>
</li>
</ul>
Expand All @@ -40,7 +40,7 @@
import { useI18n } from 'vue-i18n';
import type { IVersionLogItem } from '../../types/version-log';
const { t, locale } = useI18n();
const { t } = useI18n();
const props = withDefaults(
defineProps<{
logList: IVersionLogItem[];
Expand Down
43 changes: 22 additions & 21 deletions bcs-services/bcs-bscp/ui/src/i18n/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
同时会删除服务密钥对服务的关联规则: 'The association rule of the service key pair is deleted',
匹配结果: 'Matching result',
: 'item',
请输入配置文件绝对路径: 'Please enter the absolute path of the configuration file',
请输入配置文件名: 'Please enter the absolute path of the configuration file',
没有匹配到配置项: 'No configuration item was matched',
请先在左侧表单设置关联规则并预览: 'Please first set the association rules in the left form and preview',
删除服务成功: 'Service deleted successfully',
Expand All @@ -80,20 +80,20 @@ export default {
服务管理: 'Service Management',
分组管理: 'Group Management',
脚本管理: 'Script Management',
产品文档: 'Product Documentation',
版本日志: 'Version Log',
产品文档: 'Documentation',
版本日志: 'Release Notes',
功能特性: 'Features',
问题反馈: 'Problem Feedback',
退出登录: 'Log out',
问题反馈: 'Feedback',
退出登录: 'Sign out',
新建业务: 'New Business Creation',
模板与变量: 'Templates and Variables',
模板管理: 'Template management',
变量管理: 'Variable management',
模板管理: 'Template Management',
变量管理: 'Variable Management',
客户端管理: 'Client Management',
客户端统计: 'Client statistics',
客户端查询: 'Client query',
客户端密钥: 'Client key',
配置示例: 'Configuration example',
客户端统计: 'Client Statistics',
客户端查询: 'Client Query',
客户端密钥: 'Client Key',
配置示例: 'Configuration Example',
业务名: 'Business Name',
业务: 'Business',

Expand Down Expand Up @@ -121,22 +121,20 @@ export default {
恢复: 'Restore',
删除: 'Delete',
版本详情: 'Version Details',
'配置文件绝对路径/创建人/修改人': 'Absolute path to the configuration file / Creator / Modifier',
'配置文件名/创建人/修改人': 'Configuration file name / Creator / Modifier',
新建配置文件: 'New Configuration File',
新建配置项: 'New Configuration Item',
手动新增: 'Manually Add',
批量上传: 'Bulk Upload',
从配置模板导入: 'Import from Configuration Template',
批量导入: 'Bulk Import',
配置文件绝对路径: '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',
请输入绝对路径: 'Please enter the absolute path',
配置文件信息: 'Configuration Info',
元数据: 'Meta Data',
配置文件名称: 'Configuration file name',
配置文件名: 'Configuration file name',
配置文件描述: 'Configuration file description',
配置文件格式: 'Configuration file format',
文件权限: 'File permissions',
Expand Down Expand Up @@ -260,10 +258,10 @@ export default {
查看配置项: 'View configuration items',
线上版本: 'Online version',
对比版本: 'Compare version',
当前版本: 'Current version',
当前版本: 'Current',
上线版本: 'Online version',
只看差异文件: 'View only diffs',
搜索配置文件名称: 'Search profile name',
搜索配置文件名: 'Search profile name',
没有差异配置文件: 'No diff profile',
只看差异项: 'View only diffs',
搜索配置项名称: 'Search configuration item name',
Expand Down Expand Up @@ -358,7 +356,7 @@ export default {
请输入关键字: 'Please enter a keyword',
'格式:': 'Format:',
'key 类型 value 描述': 'key type value description',
新增服务密钥: 'Add service key',
配置客户端: 'Configuration client',
调整分组上线成功: 'Adjustment of grouping went online successfully',
导入方式: 'Import method',
文本导入: 'Text import',
Expand Down Expand Up @@ -515,6 +513,9 @@ export default {
'敏感信息类型必须为password,secret_key,token': 'Sensitive information type must be password, secret_key, token',
是否可见必须为visible或者invisible: 'Visibility must be visible or invisible',
'当前服务仅允许导入数据类型为 {n} 的服务配置项': 'The current service only allows import of service configuration items of data type {n}',
是否可见: 'visibility',
密钥类型: 'secret_type',
'请输入配置文件的完整路径和文件名,例如:/etc/nginx/nginx.conf': 'Please enter the complete path and file name of the configuration file, for example: /etc/nginx/nginx.conf',

// 分组管理
新增分组: 'New group',
Expand Down Expand Up @@ -578,7 +579,7 @@ export default {
搜索空间: 'Search Space',
创建空间: 'New Space',
'确认删除该配置模板空间?': 'Are you sure to delete this configuration template space?',
'空间可将业务下不同使用场景的配置模板文件隔离,每个空间内的配置文件路径+配置文件名称是唯一的,每个业务下会自动创建一个默认空间': 'Spaces can isolate configuration template files for different usage scenarios under a business. The configuration file path + configuration file name in each space is unique. A default space will be automatically created under each business.',
'空间可将业务下不同使用场景的配置模板文件隔离,每个空间内的配置文件路径+配置文件名是唯一的,每个业务下会自动创建一个默认空间': 'Spaces can isolate configuration template files for different usage scenarios under a business. The configuration file path + configuration file name in each space is unique. A default space will be automatically created under each business.',
未能删除: 'Unable to delete',
请先确认删除此空间下所有配置文件: 'Please confirm first to delete all configuration files in this space',
请先确认删除此空间下所有配置套餐: 'Please confirm first to delete all configuration packages in this space',
Expand Down Expand Up @@ -613,7 +614,7 @@ export default {
'服务名称/配置文件版本': 'Service name/config file version',
配置文件版本: 'Profile version',
引用此配置文件的服务: 'Services that reference this profile',
'配置文件绝对路径/描述/创建人/更新人': 'Absolute path to the configuration file/path/description/creator/updater',
'配置文件名/描述/创建人/更新人': 'Absolute path to the configuration file/path/description/creator/updater',
所在套餐: 'The package you are in',
更新人: 'Updater',
更新时间: 'Update time',
Expand All @@ -631,7 +632,7 @@ export default {
'若未指定套餐,此配置文件模板将无法被服务引用。后续请使用「添加至」或「添加已有配置文件」功能添加至指定套餐': 'If no package is specified, this configuration file template cannot be referenced by the service. Later, please use the "Add to" or "Add existing profile" function to add it to the specified package.',
以下服务配置的未命名版本引用目标套餐的内容也将更新: 'Unnamed versions of the following service configurations referencing target packages will also be updated',
从已有配置文件添加: 'Add from existing configuration file',
'配置文件绝对路径/描述': 'Absolute path to the configuration file/path/description',
'配置文件名/描述': 'Configuration file name /description',
已选: 'selected',
请先从左侧选择配置文件: 'Please select the profile from the left first',
添加: 'Add to',
Expand Down
59 changes: 50 additions & 9 deletions bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,21 @@ export default {
恢复: '恢复',
删除: '删除',
版本详情: '版本详情',
'配置文件绝对路径/创建人/修改人': '配置文件绝对路径/创建人/修改人',
'配置文件名/创建人/修改人': '配置文件名/创建人/修改人',
新建配置文件: '新建配置文件',
新建配置项: '新建配置项',
手动新增: '手动新增',
批量上传: '批量上传',
从配置模板导入: '从配置模板导入',
批量导入: '批量导入',
配置文件绝对路径: '配置文件绝对路径',
配置文件名: '配置文件名',
请输入配置文件的绝对路径: '请输入配置文件的绝对路径',
'请输入1~64个字符,只允许英文、数字、下划线、中划线或点': '请输入1~64个字符,只允许英文、数字、下划线、中划线或点',
配置文件路径: '配置文件路径',
'客户端拉取配置文件后存放路径为:临时目录/业务ID/服务名称/files/配置文件路径,除了配置文件路径其它参数都在客户端sidecar中配置': '客户端拉取配置文件后存放路径为:临时目录/业务ID/服务名称/files/配置文件路径,除了配置文件路径其它参数都在客户端sidecar中配置',
请输入绝对路径: '请输入绝对路径',
配置文件信息: '配置文件信息',
元数据: '元数据',
配置文件名称: '配置文件名称',
配置文件描述: '配置文件描述',
配置文件格式: '配置文件格式',
文件权限: '文件权限',
Expand Down Expand Up @@ -262,7 +261,7 @@ export default {
当前版本: '当前版本',
上线版本: '上线版本',
只看差异文件: '只看差异文件',
搜索配置文件名称: '搜索配置文件名称',
搜索配置文件名: '搜索配置文件名',
没有差异配置文件: '没有差异配置文件',
只看差异项: '只看差异项',
搜索配置项名称: '搜索配置项名称',
Expand Down Expand Up @@ -358,7 +357,7 @@ export default {
请输入关键字: '请输入关键字',
'格式:': '格式:',
'key 类型 value 描述': 'key 类型 value 描述',
新增服务密钥: '新增服务密钥',
配置客户端: '配置客户端',
调整分组上线成功: '调整分组上线成功',
导入方式: '导入方式',
文本导入: '文本导入',
Expand Down Expand Up @@ -474,6 +473,48 @@ export default {
'上传后,该服务的配置文件数量将达到 {n} 个,超过了最大限制': '上传后,该服务的配置文件数量将达到 {n} 个,超过了最大限制',
'文件上传准备中,请稍候…': '文件上传准备中,请稍候…',
'( 后台已存在此文件,上传快速完成 )': '( 后台已存在此文件,上传快速完成 )',
'已限制该服务下所有配置项数据类型为{n},如需其他数据类型,请调整服务属性下的数据类型': '已限制该服务下所有配置项数据类型为{n},如需其他数据类型,请调整服务属性下的数据类型',
敏感信息不可见: '敏感信息不可见',
'「敏感信息不可见」启用提示': '「敏感信息不可见」启用提示',
'启用后,可降低数据泄露风险。尽管客户端拉去配置不受影响,但仍存在以下注意事项:': '启用后,可降低数据泄露风险。尽管客户端拉去配置不受影响,但仍存在以下注意事项:',
'⒈ 用户无法直接查看敏感数据,将导致查看和对比操作不便': '⒈ 用户无法直接查看敏感数据,将导致查看和对比操作不便',
'⒉ 编辑敏感信息时,需重新输入完整数据 ': '⒉ 编辑敏感信息时,需重新输入完整数据 ',
'⒊ 若忘记或丢失敏感信息,可能需要通过其他途径找回或重置': '⒊ 若忘记或丢失敏感信息,可能需要通过其他途径找回或重置',
'敏感数据不可见,无法查看实际内容;如需修改,请重新输入': '敏感数据不可见,无法查看实际内容;如需修改,请重新输入',
'建议长度 {n} 字符': '建议长度 {n} 字符',
'至少包含大写字母、小写字母、数字和特殊字符中的 3 种类型': '至少包含大写字母、小写字母、数字和特殊字符中的 3 种类型',
证书: '证书',
密码: '密码',
请输入密码: '请输入密码',
API密钥: 'API密钥',
'请输入 API 密钥': '请输入 API 密钥',
'包含大写字母、小写字母和数字': '包含大写字母、小写字母和数字',
访问令牌: '访问令牌',
'请输入访问令牌,目前只支持 OAuth2.0 与 JWT 类型的访问令牌': '请输入访问令牌,目前只支持 OAuth2.0 与 JWT 类型的访问令牌',
'证书将在 {n} 天后到期,请考虑更换新证书': '证书将在 {n} 天后到期,请考虑更换新证书',
'证书已过期,请更换证书后再进行提交': '证书已过期,请更换证书后再进行提交',
'证书格式不正确(只支持 X.509 类型证书)': '证书格式不正确(只支持 X.509 类型证书)',
'证书未经受信任的证书颁发机构签发,在生产环境中建议使用经权威证书颁发机构签发的证书': '证书未经受信任的证书颁发机构签发,在生产环境中建议使用经权威证书颁发机构签发的证书',
'目前只支持 X.509 类型证书': '目前只支持 X.509 类型证书',
确定启用: '确定启用',
'访问令牌格式不正确(只支持 OAuth2.0 与 JWT 类型的访问令牌)': '访问令牌格式不正确(只支持 OAuth2.0 与 JWT 类型的访问令牌)',
新建配置项成功: '新建配置项成功',
'敏感数据不可见,无法查看实际内容': '敏感数据不可见,无法查看实际内容',
'普通文本格式:': '普通文本格式:',
'key 数据类型 value 描述(可选)': 'key 数据类型 value 描述(可选)',
'敏感文本格式:': '敏感文本格式:',
'key 数据类型 凭证类型 value 是否可见 描述(可选)': 'key 数据类型 凭证类型 value 是否可见 描述(可选)',
'密码示例:': '密码示例:',
'API密钥示例:': 'API密钥示例:',
'访问令牌示例:': '访问令牌示例:',
'类型必须为 string , number 或者secret': '类型必须为 string , number 或者secret',
'敏感信息类型必须为password,secret_key,token': '敏感信息类型必须为password,secret_key,token',
是否可见必须为visible或者invisible: '是否可见必须为visible或者invisible',
'当前服务仅允许导入数据类型为 {n} 的服务配置项': '当前服务仅允许导入数据类型为 {n} 的服务配置项',
是否可见: '是否可见',
密钥类型: '密钥类型',
'请输入配置文件的完整路径和文件名,例如:/etc/nginx/nginx.conf': '请输入配置文件的完整路径和文件名,例如:/etc/nginx/nginx.conf',
只看冲突配置项: '只看冲突配置项',

// 分组管理
新增分组: '新增分组',
Expand Down Expand Up @@ -536,7 +577,7 @@ export default {
搜索空间: '搜索空间',
创建空间: '创建空间',
'确认删除该配置模板空间?': '确认删除该配置模板空间?',
'空间可将业务下不同使用场景的配置模板文件隔离,每个空间内的配置文件路径+配置文件名称是唯一的,每个业务下会自动创建一个默认空间': '空间可将业务下不同使用场景的配置模板文件隔离,每个空间内的配置文件路径+配置文件名称是唯一的,每个业务下会自动创建一个默认空间',
'空间可将业务下不同使用场景的配置模板文件隔离,每个空间内的配置文件路径+配置文件名是唯一的,每个业务下会自动创建一个默认空间': '空间可将业务下不同使用场景的配置模板文件隔离,每个空间内的配置文件路径+配置文件名是唯一的,每个业务下会自动创建一个默认空间',
未能删除: '未能删除',
请先确认删除此空间下所有配置文件: '请先确认删除此空间下所有配置文件',
请先确认删除此空间下所有配置套餐: '请先确认删除此空间下所有配置套餐',
Expand Down Expand Up @@ -571,7 +612,7 @@ export default {
'服务名称/配置文件版本': '服务名称/配置文件版本',
配置文件版本: '配置文件版本',
引用此配置文件的服务: '引用此配置文件的服务',
'配置文件绝对路径/描述/创建人/更新人': '配置文件绝对路径/描述/创建人/更新人',
'配置文件名/描述/创建人/更新人': '配置文件名/描述/创建人/更新人',
所在套餐: '所在套餐',
更新人: '更新人',
更新时间: '更新时间',
Expand All @@ -589,7 +630,7 @@ export default {
'若未指定套餐,此配置文件模板将无法被服务引用。后续请使用「添加至」或「添加已有配置文件」功能添加至指定套餐': '若未指定套餐,此配置文件模板将无法被服务引用。后续请使用「添加至」或「添加已有配置文件」功能添加至指定套餐',
以下服务配置的未命名版本引用目标套餐的内容也将更新: '以下服务配置的未命名版本引用目标套餐的内容也将更新',
从已有配置文件添加: '从已有配置文件添加',
'配置文件绝对路径/描述': '配置文件绝对路径/描述',
'配置文件名/描述': '配置文件名/描述',
已选: '已选',
请先从左侧选择配置文件: '请先从左侧选择配置文件',
添加: '添加',
Expand Down Expand Up @@ -741,7 +782,7 @@ export default {
密钥名称已存在: '密钥名称已存在',
匹配结果: '匹配结果',
: '项',
请输入配置文件绝对路径: '请输入配置文件绝对路径',
请输入配置文件名: '请输入配置文件名',
没有匹配到配置项: '没有匹配到配置项',
请先在左侧表单设置关联规则并预览: '请先在左侧表单设置关联规则并预览',

Expand Down
Loading

0 comments on commit 247b59f

Please sign in to comment.