diff --git a/releasenotes/notes/Add-Setting-Key-Description-54a1702f2f25e4d5.yaml b/releasenotes/notes/Add-Setting-Key-Description-54a1702f2f25e4d5.yaml new file mode 100644 index 00000000..d89f5e95 --- /dev/null +++ b/releasenotes/notes/Add-Setting-Key-Description-54a1702f2f25e4d5.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add a description for each setting key to better understand the meaning of each key. diff --git a/src/locales/en.json b/src/locales/en.json index 94713dca..0ded266f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1007,6 +1007,7 @@ "Flavor Detail": "Flavor Detail", "Flavor Info": "Flavor Info", "Flavor Name": "Flavor Name", + "Flavor families, used to configure the instance flavor classification": "Flavor families, used to configure the instance flavor classification", "Flavor of Master Nodes": "Flavor of Master Nodes", "Flavor of Nodes": "Flavor of Nodes", "Flavors": "Flavors", @@ -1055,6 +1056,7 @@ "GPU Model": "GPU Model", "GPU Parameters": "GPU Parameters", "GPU Type": "GPU Type", + "GPU model, used when configuring Compute Optimized Type with GPU": "GPU model, used when configuring Compute Optimized Type with GPU", "GPU pass-through will load GPU devices directly to the instance for use. VGPU is a GPU virtualization solution. GPU resources will be segmented and distributed to multiple instances for shared use.": "GPU pass-through will load GPU devices directly to the instance for use. VGPU is a GPU virtualization solution. GPU resources will be segmented and distributed to multiple instances for shared use.", "GRE": "GRE", "Gabon": "Gabon", @@ -2577,6 +2579,7 @@ "UPDATE IN PROGRESS": "UPDATE IN PROGRESS", "USB Info": "USB Info", "USB Parameters": "USB Parameters", + "USB model, used when configuring instance flavor": "USB model, used when configuring instance flavor", "USER": "USER", "UUID": "UUID", "Ubuntu": "Ubuntu", diff --git a/src/locales/ko-kr.json b/src/locales/ko-kr.json index 875f9275..9a68a2d0 100644 --- a/src/locales/ko-kr.json +++ b/src/locales/ko-kr.json @@ -1007,6 +1007,7 @@ "Flavor Detail": "Flavor 세부 정보", "Flavor Info": "Flavor 정보", "Flavor Name": "Flavor 이름", + "Flavor families, used to configure the instance flavor classification": "", "Flavor of Master Nodes": "마스터 노드 Flavor", "Flavor of Nodes": "노드 Flavor", "Flavors": "", @@ -1055,6 +1056,7 @@ "GPU Model": "GPU 모델", "GPU Parameters": "GPU 파라미터", "GPU Type": "GPU 타입", + "GPU model, used when configuring Compute Optimized Type with GPU": "", "GPU pass-through will load GPU devices directly to the instance for use. VGPU is a GPU virtualization solution. GPU resources will be segmented and distributed to multiple instances for shared use.": "GPU pass-through는 GPU 디바이스를 인스턴스에 직접 로드하여 사용합니다. VGPU는 GPU 가상화 솔루션입니다. GPU 리소스는 공유 사용을 위해 여러 인스턴스로 분할 및 분배됩니다.", "GRE": "", "Gabon": "", @@ -2577,6 +2579,7 @@ "UPDATE IN PROGRESS": "UPDATE IN PROGRESS", "USB Info": "USB Info", "USB Parameters": "USB Parameters", + "USB model, used when configuring instance flavor": "", "USER": "USER", "UUID": "UUID", "Ubuntu": "Ubuntu", diff --git a/src/locales/zh-hans.json b/src/locales/zh-hans.json index bee612fa..a55450ec 100644 --- a/src/locales/zh-hans.json +++ b/src/locales/zh-hans.json @@ -1007,6 +1007,7 @@ "Flavor Detail": "云主机类型详情", "Flavor Info": "配置信息", "Flavor Name": "云主机类型名称", + "Flavor families, used to configure the instance flavor classification": "云主机类型规格族,用于配置云主机类型的分类", "Flavor of Master Nodes": "主节点类型", "Flavor of Nodes": "节点类型", "Flavors": "云主机类型", @@ -1055,6 +1056,7 @@ "GPU Model": "GPU型号", "GPU Parameters": "GPU参数", "GPU Type": "GPU类型", + "GPU model, used when configuring Compute Optimized Type with GPU": "GPU 型号,配置 GPU 计算型云主机类型时使用", "GPU pass-through will load GPU devices directly to the instance for use. VGPU is a GPU virtualization solution. GPU resources will be segmented and distributed to multiple instances for shared use.": "GPU直通将GPU设备直接加载给云主机进行使用。vGPU是GPU虚拟化方案,GPU资源将被切分后分配给多个云主机共享使用。", "GRE": "", "Gabon": "加蓬", @@ -2577,6 +2579,7 @@ "UPDATE IN PROGRESS": "更新中", "USB Info": "USB 信息", "USB Parameters": "USB参数", + "USB model, used when configuring instance flavor": "USB 型号,配置云主机类型时使用", "USER": "用户", "UUID": "", "Ubuntu": "", diff --git a/src/pages/configuration/containers/Setting/index.jsx b/src/pages/configuration/containers/Setting/index.jsx index 3433b98e..6fd563d6 100644 --- a/src/pages/configuration/containers/Setting/index.jsx +++ b/src/pages/configuration/containers/Setting/index.jsx @@ -16,6 +16,7 @@ import { observer, inject } from 'mobx-react'; import Base from 'containers/List'; import globalSettingStore from 'stores/skyline/setting'; import { onlyAdminCanReadPolicy } from 'resources/skyline/policy'; +import { SETTING_DESC } from 'resources/skyline/setting'; import actionConfigs from './actions'; export class Setting extends Base { @@ -43,19 +44,31 @@ export class Setting extends Base { return actionConfigs; } - getColumns = () => [ - { - title: t('Type'), - dataIndex: 'key', - }, - { - title: t('Effective Mode'), - dataIndex: 'restart_service', - titleTip: t('Effective mode after configuration changes'), - render: (value) => - value ? t('Take effect after restart') : t('Immediate effect'), - }, - ]; + getDesc(record) { + const { key } = record; + return SETTING_DESC[key] || '-'; + } + + getColumns() { + return [ + { + title: t('Type'), + dataIndex: 'key', + }, + { + title: t('Effective Mode'), + dataIndex: 'restart_service', + titleTip: t('Effective mode after configuration changes'), + render: (value) => + value ? t('Take effect after restart') : t('Immediate effect'), + }, + { + title: t('Description'), + dataIndex: 'description', + render: (value, record) => this.getDesc(record), + }, + ]; + } get searchFilters() { return []; diff --git a/src/resources/skyline/setting.js b/src/resources/skyline/setting.js new file mode 100644 index 00000000..227d6e12 --- /dev/null +++ b/src/resources/skyline/setting.js @@ -0,0 +1,9 @@ +export const SETTING_DESC = { + flavor_families: t( + 'Flavor families, used to configure the instance flavor classification' + ), + gpu_models: t( + 'GPU model, used when configuring Compute Optimized Type with GPU' + ), + usb_models: t('USB model, used when configuring instance flavor'), +};