diff --git a/apps/halo/versions/1.6.0/config.json b/apps/halo/versions/1.6.0/config.json index 82b91fbe7..28c4bfdbd 100644 --- a/apps/halo/versions/1.6.0/config.json +++ b/apps/halo/versions/1.6.0/config.json @@ -26,7 +26,7 @@ "envKey": "PANEL_DB_USER" }, { - "type": "text", + "type": "password", "labelZh": "数据库用户密码", "labelEn": "Password", "required": true, diff --git a/apps/minio/versions/RELEASE.2022-08-13T21-54-44Z/config.json b/apps/minio/versions/RELEASE.2022-08-13T21-54-44Z/config.json index fe6c8a10e..cf36b6e9f 100644 --- a/apps/minio/versions/RELEASE.2022-08-13T21-54-44Z/config.json +++ b/apps/minio/versions/RELEASE.2022-08-13T21-54-44Z/config.json @@ -9,7 +9,7 @@ "envKey": "MINIO_ROOT_USER" }, { - "type": "text", + "type": "password", "labelZh": "密码", "labelEn": "Password", "required": true, diff --git a/apps/mysql/versions/5.7.39/config.json b/apps/mysql/versions/5.7.39/config.json index fee421333..45ff8fe7a 100644 --- a/apps/mysql/versions/5.7.39/config.json +++ b/apps/mysql/versions/5.7.39/config.json @@ -1,7 +1,7 @@ { "formFields": [ { - "type": "text", + "type": "password", "labelZh": "Root用户密码", "labelEn": "RootPassword", "required": true, diff --git a/apps/mysql/versions/8.0.30/config.json b/apps/mysql/versions/8.0.30/config.json index fee421333..45ff8fe7a 100644 --- a/apps/mysql/versions/8.0.30/config.json +++ b/apps/mysql/versions/8.0.30/config.json @@ -1,7 +1,7 @@ { "formFields": [ { - "type": "text", + "type": "password", "labelZh": "Root用户密码", "labelEn": "RootPassword", "required": true, diff --git a/apps/redis-commander/versions/0.8.0/config.json b/apps/redis-commander/versions/0.8.0/config.json index 07e960da1..230221f4d 100644 --- a/apps/redis-commander/versions/0.8.0/config.json +++ b/apps/redis-commander/versions/0.8.0/config.json @@ -10,12 +10,12 @@ "envKey": "PANEL_REDIS_HOST" }, { - "type": "text", + "type": "password", "labelZh": "密码", "labelEn": "Password", "required": true, "default": "eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81", - "envKey": "PANEL_DB_ROOT_PASSWORD" + "envKey": "PANEL_DB_ROOT_PASSWORD" }, { "type": "number", diff --git a/apps/redis/versions/6.0.16/config.json b/apps/redis/versions/6.0.16/config.json index 91b94279a..6e99bec15 100644 --- a/apps/redis/versions/6.0.16/config.json +++ b/apps/redis/versions/6.0.16/config.json @@ -1,7 +1,7 @@ { "formFields": [ { - "type": "text", + "type": "password", "labelZh": "密码", "labelEn": "Password", "required": true, diff --git a/apps/redis/versions/7.0.5/config.json b/apps/redis/versions/7.0.5/config.json index 91b94279a..6e99bec15 100644 --- a/apps/redis/versions/7.0.5/config.json +++ b/apps/redis/versions/7.0.5/config.json @@ -1,7 +1,7 @@ { "formFields": [ { - "type": "text", + "type": "password", "labelZh": "密码", "labelEn": "Password", "required": true, diff --git a/apps/wordpress/versions/6.0.1/config.json b/apps/wordpress/versions/6.0.1/config.json index 82b91fbe7..28c4bfdbd 100644 --- a/apps/wordpress/versions/6.0.1/config.json +++ b/apps/wordpress/versions/6.0.1/config.json @@ -26,7 +26,7 @@ "envKey": "PANEL_DB_USER" }, { - "type": "text", + "type": "password", "labelZh": "数据库用户密码", "labelEn": "Password", "required": true, diff --git a/apps/wordpress/versions/6.0.2/config.json b/apps/wordpress/versions/6.0.2/config.json index 82b91fbe7..28c4bfdbd 100644 --- a/apps/wordpress/versions/6.0.2/config.json +++ b/apps/wordpress/versions/6.0.2/config.json @@ -26,7 +26,7 @@ "envKey": "PANEL_DB_USER" }, { - "type": "text", + "type": "password", "labelZh": "数据库用户密码", "labelEn": "Password", "required": true, diff --git a/frontend/src/global/form-rules.ts b/frontend/src/global/form-rules.ts index c1ba1b6bf..1480d02b8 100644 --- a/frontend/src/global/form-rules.ts +++ b/frontend/src/global/form-rules.ts @@ -58,7 +58,7 @@ const checkLinuxName = (rule: any, value: any, callback: any) => { if (value === '' || typeof value === 'undefined' || value == null) { callback(new Error(i18n.global.t('commons.rule.linuxName'))); } 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 !== '') { callback(new Error(i18n.global.t('commons.rule.linuxName'))); } else { diff --git a/frontend/src/views/app-store/detail/params/index.vue b/frontend/src/views/app-store/detail/params/index.vue index 036730331..516a63ab1 100644 --- a/frontend/src/views/app-store/detail/params/index.vue +++ b/frontend/src/views/app-store/detail/params/index.vue @@ -107,6 +107,9 @@ const handleParams = () => { rules[p.envKey] = [Rules.requiredSelect]; } else { rules[p.envKey] = [Rules.requiredInput]; + if (p.envKey === 'PANEL_DB_NAME') { + rules[p.envKey].push(Rules.linuxName); + } } } if (p.key) {