Skip to content

Commit c9ffd25

Browse files
feat: 基本名称名称长度限制增加到 128 (#1658)
1 parent cd6e5f7 commit c9ffd25

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

frontend/src/global/form-rules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const checkLinuxName = (rule: any, value: any, callback: any) => {
174174
if (value === '' || typeof value === 'undefined' || value == null) {
175175
callback(new Error(i18n.global.t('commons.rule.linuxName', ['/\\:*?\'"<>|'])));
176176
} else {
177-
const reg = /^[^/\\\"'|<>?*]{1,30}$/;
177+
const reg = /^[^/\\\"'|<>?*]{1,128}$/;
178178
if (!reg.test(value) && value !== '') {
179179
callback(new Error(i18n.global.t('commons.rule.linuxName', ['/\\:*?\'"<>|'])));
180180
} else {
@@ -402,7 +402,7 @@ const checkParamSimple = (rule: any, value: any, callback: any) => {
402402
if (value === '' || typeof value === 'undefined' || value == null) {
403403
callback();
404404
} else {
405-
const reg = /^[a-z0-9][a-z0-9]{1,64}$/;
405+
const reg = /^[a-z0-9][a-z0-9]{1,128}$/;
406406
if (!reg.test(value) && value !== '') {
407407
callback(new Error(i18n.global.t('commons.rule.paramSimple')));
408408
} else {

frontend/src/lang/modules/en.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ const message = {
159159
complexityPassword:
160160
'Longer than eight characters and contains at least two combinations of letters, digits, and special characters',
161161
commonPassword: 'Please enter a password with more than 6 characters',
162+
linuxName: 'Length 1-128, the name cannot contain symbols such as {0}',
162163
email: 'Email format error',
163164
number: 'Please enter the correct number',
164165
integer: 'Please enter the correct positive integer',
@@ -180,7 +181,7 @@ const message = {
180181
'Supports letters, numbers, underscores, hyphens and dots, cannot end with hyphen- or dot.1-127',
181182
disableFunction: 'Only support letters and,',
182183
leechExts: 'Only support letters, numbers and,',
183-
paramSimple: 'Support lowercase letters and numbers, length 1-64',
184+
paramSimple: 'Support lowercase letters and numbers, length 1-128',
184185
},
185186
res: {
186187
paramError: 'The request failed, please try again later!',
@@ -1614,7 +1615,7 @@ const message = {
16141615
laddr: 'Source address/port',
16151616
raddr: 'Destination address/port',
16161617
stopProcess: 'End',
1617-
stopProcessWarn: 'Are you sure you want to end this process (PID:{0})? This operation cannot be rolled back',
1618+
stopProcessWarn: 'Are you sure you want to end this process (PID:{0})? ',
16181619
},
16191620
};
16201621

frontend/src/lang/modules/tw.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const message = {
159159
volumeName: '支持英文、數字、.-和_,長度2-30',
160160
complexityPassword: '請輸入長度大於 8 位且包含字母、數字、特殊字符至少兩項的密碼組合',
161161
commonPassword: '請輸入 6 位以上長度密碼',
162-
linuxName: '長度1-30,名稱不能含有{0}等符號',
162+
linuxName: '長度1-128,名稱不能含有{0}等符號',
163163
email: '請輸入正確的郵箱',
164164
number: '請輸入正確的數字',
165165
integer: '請輸入正確的正整數',
@@ -179,7 +179,7 @@ const message = {
179179
containerName: '支持字母、數字、下劃線、連字符和點,不能以連字符-或點.結尾,長度1-127',
180180
disableFunction: '僅支持字母和,',
181181
leechExts: '僅支持字母數字和,',
182-
paramSimple: '支持小寫字母和數字,長度1-64',
182+
paramSimple: '支持小寫字母和數字,長度 1-128',
183183
},
184184
res: {
185185
paramError: '請求失敗,請稍後重試!',
@@ -1530,7 +1530,7 @@ const message = {
15301530
laddr: '源地址/端口',
15311531
raddr: '目標地址/端口',
15321532
stopProcess: '結束',
1533-
stopProcessWarn: '是否確定結束此進程 (PID:{0})?此操作不可回滾',
1533+
stopProcessWarn: '是否確定結束此進程 (PID:{0})?',
15341534
},
15351535
};
15361536
export default {

frontend/src/lang/modules/zh.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const message = {
159159
volumeName: '支持英文、数字、.-和_,长度2-30',
160160
complexityPassword: '请输入长度大于 8 位且包含字母、数字、特殊字符至少两项的密码组合',
161161
commonPassword: '请输入 6 位以上长度密码',
162-
linuxName: '长度1-30,名称不能含有{0}等符号',
162+
linuxName: '长度1-128,名称不能含有{0}等符号',
163163
email: '请输入正确的邮箱',
164164
number: '请输入正确的数字',
165165
integer: '请输入正确的正整数',
@@ -179,7 +179,7 @@ const message = {
179179
containerName: '支持字母、数字、下划线、连字符和点,不能以连字符-或点.结尾,长度1-127',
180180
disableFunction: '仅支持字母和,',
181181
leechExts: '仅支持字母数字和,',
182-
paramSimple: '支持小写字母和数字,长度1-64',
182+
paramSimple: '支持小写字母和数字,长度1-128',
183183
},
184184
res: {
185185
paramError: '请求失败,请稍后重试!',
@@ -1538,7 +1538,7 @@ const message = {
15381538
laddr: '源地址/端口',
15391539
raddr: '目标地址/端口',
15401540
stopProcess: '结束',
1541-
stopProcessWarn: '是否确定结束此进程 (PID:{0})?此操作不可回滚',
1541+
stopProcessWarn: '是否确定结束此进程 (PID:{0})?',
15421542
processName: '进程名称',
15431543
},
15441544
};

0 commit comments

Comments
 (0)