diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts
index 3135874..0f875c6 100644
--- a/src/locales/langs/zh-cn.ts
+++ b/src/locales/langs/zh-cn.ts
@@ -1,3 +1,5 @@
+import {$t} from "@/locales";
+
const local: App.I18n.Schema = {
system: {
title: 'Task Flux',
@@ -521,9 +523,9 @@ const local: App.I18n.Schema = {
title: '在线机器',
nodeType: '类型',
groupName: '组名称',
- hostId: 'Pod ID',
- hostIp: 'IP',
- hostPort: 'Port',
+ hostId: '机器 ID',
+ hostIp: 'IP地址',
+ hostPort: '端口',
consumerBuckets: '路径/组',
updateDt: '更新时间',
contextPath: '路径/组',
@@ -538,7 +540,7 @@ const local: App.I18n.Schema = {
namespace: {
title: '命名空间',
name: '名称',
- keyword: '空间名称/唯一标识',
+ keyword: '名称/标识',
uniqueId: '唯一标识(默认UUID)',
form: {
name: '请输入空间名称',
@@ -554,6 +556,7 @@ const local: App.I18n.Schema = {
detail: '组详情',
namespaceId: '命名空间ID',
groupName: '组名称',
+ groupNameCn: '中文组名称',
token: 'Token',
groupStatus: '状态',
idGeneratorMode: 'ID生成模式',
@@ -567,6 +570,7 @@ const local: App.I18n.Schema = {
retryConfig: '重试配置',
form: {
groupName: '请输入组名称',
+ groupNameCn: '请输入中文组名称',
token: 'Token',
groupStatus: '状态',
description: '描述',
diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts
index 21bdea0..b32c793 100644
--- a/src/typings/api.d.ts
+++ b/src/typings/api.d.ts
@@ -389,6 +389,8 @@ declare namespace Api {
namespaceName?: string;
/** 组名 */
groupName: string;
+ /** 中文组名 */
+ groupNameCn: string;
/** 组描述 */
description: string;
/** token */
@@ -420,6 +422,7 @@ declare namespace Api {
type GroupConfigRequestVO = {
groupName: string;
+ groupNameCn: string;
groupStatus: GroupStatusType;
token?: string;
description?: string;
diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts
index c81a83b..559918c 100644
--- a/src/typings/app.d.ts
+++ b/src/typings/app.d.ts
@@ -776,6 +776,7 @@ declare namespace App {
detail: string;
namespaceId: string;
groupName: string;
+ groupNameCn: string;
description: string;
token: string;
groupStatus: string;
@@ -789,6 +790,7 @@ declare namespace App {
retryConfig: string;
form: {
groupName: string;
+ groupNameCn: string;
token: string;
groupStatus: string;
description: string;
diff --git a/src/views/group/index.vue b/src/views/group/index.vue
index 8f28ec0..5152e67 100644
--- a/src/views/group/index.vue
+++ b/src/views/group/index.vue
@@ -55,6 +55,13 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
);
}
},
+ {
+ key: 'groupNameCn',
+ title: $t('page.groupConfig.groupNameCn'),
+ align: 'center',
+ minWidth: 100,
+
+ },
{
key: 'groupStatus',
title: $t('page.groupConfig.groupStatus'),
diff --git a/src/views/group/modules/group-detail-drawer.vue b/src/views/group/modules/group-detail-drawer.vue
index d05ae19..790bd33 100644
--- a/src/views/group/modules/group-detail-drawer.vue
+++ b/src/views/group/modules/group-detail-drawer.vue
@@ -50,6 +50,9 @@ async function handleCopy(source?: string) {
{{ rowData?.groupName }}
+
+ {{ rowData?.groupNameCn }}
+
diff --git a/src/views/group/modules/group-operate-drawer.vue b/src/views/group/modules/group-operate-drawer.vue
index c194f1b..c82cad2 100644
--- a/src/views/group/modules/group-operate-drawer.vue
+++ b/src/views/group/modules/group-operate-drawer.vue
@@ -45,7 +45,7 @@ const partitionList = ref([]);
type Model = Pick<
Api.GroupConfig.GroupConfig,
- 'id' | 'groupName' | 'token' | 'groupStatus' | 'description' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
+ 'id' | 'groupName' | 'groupNameCn' | 'token' | 'groupStatus' | 'description' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
>;
const model: Model = reactive(createDefaultModel());
@@ -53,6 +53,7 @@ const model: Model = reactive(createDefaultModel());
function createDefaultModel(): Model {
return {
groupName: '',
+ groupNameCn: '',
token: import.meta.env.VITE_APP_DEFAULT_TOKEN || '',
groupStatus: 1,
description: '',
@@ -64,7 +65,7 @@ function createDefaultModel(): Model {
type RuleKey = Extract<
keyof Model,
- 'groupName' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
+ 'groupName' | 'groupNameCn' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
>;
const rules = {
@@ -76,6 +77,8 @@ const rules = {
message: $t('page.groupConfig.form.groupNameRule')
}
],
+ groupNameCn: [defaultRequiredRule],
+
token: [defaultRequiredRule],
groupStatus: [defaultRequiredRule],
idGeneratorMode: [defaultRequiredRule],
@@ -102,9 +105,10 @@ async function handleSubmit() {
await validate();
// request
if (props.operateType === 'add') {
- const { groupName, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
+ const { groupName, groupNameCn, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
const { error } = await fetchAddGroupConfig({
groupName,
+ groupNameCn,
token,
groupStatus,
description,
@@ -115,9 +119,11 @@ async function handleSubmit() {
if (error) return;
window.$message?.success($t('common.addSuccess'));
} else {
- const { groupName, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
+
+ const { groupName, groupNameCn, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
const { error } = await fetchEditGroupConfig({
groupName,
+ groupNameCn,
token,
groupStatus,
description,
@@ -200,6 +206,15 @@ async function handleCopy(source: string) {
:disabled="props.operateType === 'edit'"
/>
+
+
+