mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-10 03:30:53 +08:00
fix: 修改校验信息
This commit is contained in:
parent
d58c459e81
commit
1787261727
11 changed files with 14 additions and 11 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
"envKey": "PANEL_DB_USER"
|
"envKey": "PANEL_DB_USER"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "数据库用户密码",
|
"labelZh": "数据库用户密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
"envKey": "MINIO_ROOT_USER"
|
"envKey": "MINIO_ROOT_USER"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "密码",
|
"labelZh": "密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"formFields": [
|
"formFields": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "Root用户密码",
|
"labelZh": "Root用户密码",
|
||||||
"labelEn": "RootPassword",
|
"labelEn": "RootPassword",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"formFields": [
|
"formFields": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "Root用户密码",
|
"labelZh": "Root用户密码",
|
||||||
"labelEn": "RootPassword",
|
"labelEn": "RootPassword",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@
|
||||||
"envKey": "PANEL_REDIS_HOST"
|
"envKey": "PANEL_REDIS_HOST"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "密码",
|
"labelZh": "密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
"default": "eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81",
|
"default": "eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81",
|
||||||
"envKey": "PANEL_DB_ROOT_PASSWORD"
|
"envKey": "PANEL_DB_ROOT_PASSWORD"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "number",
|
"type": "number",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"formFields": [
|
"formFields": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "密码",
|
"labelZh": "密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"formFields": [
|
"formFields": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "密码",
|
"labelZh": "密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"envKey": "PANEL_DB_USER"
|
"envKey": "PANEL_DB_USER"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "数据库用户密码",
|
"labelZh": "数据库用户密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"envKey": "PANEL_DB_USER"
|
"envKey": "PANEL_DB_USER"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "password",
|
||||||
"labelZh": "数据库用户密码",
|
"labelZh": "数据库用户密码",
|
||||||
"labelEn": "Password",
|
"labelEn": "Password",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ const checkLinuxName = (rule: any, value: any, callback: any) => {
|
||||||
if (value === '' || typeof value === 'undefined' || value == null) {
|
if (value === '' || typeof value === 'undefined' || value == null) {
|
||||||
callback(new Error(i18n.global.t('commons.rule.linuxName')));
|
callback(new Error(i18n.global.t('commons.rule.linuxName')));
|
||||||
} else {
|
} else {
|
||||||
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9_.]{0,30}$/;
|
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9_.-]{0,30}$/;
|
||||||
if (!reg.test(value) && value !== '') {
|
if (!reg.test(value) && value !== '') {
|
||||||
callback(new Error(i18n.global.t('commons.rule.linuxName')));
|
callback(new Error(i18n.global.t('commons.rule.linuxName')));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,9 @@ const handleParams = () => {
|
||||||
rules[p.envKey] = [Rules.requiredSelect];
|
rules[p.envKey] = [Rules.requiredSelect];
|
||||||
} else {
|
} else {
|
||||||
rules[p.envKey] = [Rules.requiredInput];
|
rules[p.envKey] = [Rules.requiredInput];
|
||||||
|
if (p.envKey === 'PANEL_DB_NAME') {
|
||||||
|
rules[p.envKey].push(Rules.linuxName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (p.key) {
|
if (p.key) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue