mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: mysql 数据库命名规则调整
This commit is contained in:
parent
cfeb158d0a
commit
cecfecfe94
@ -495,7 +495,14 @@ func updateInstallInfoInDB(appKey, appName, param string, isRestart bool, value
|
|||||||
"param": strings.ReplaceAll(appInstall.Param, oldVal, newVal),
|
"param": strings.ReplaceAll(appInstall.Param, oldVal, newVal),
|
||||||
"env": strings.ReplaceAll(appInstall.Env, oldVal, newVal),
|
"env": strings.ReplaceAll(appInstall.Env, oldVal, newVal),
|
||||||
}, commonRepo.WithByID(appInstall.ID))
|
}, commonRepo.WithByID(appInstall.ID))
|
||||||
|
}
|
||||||
|
if param == "user-password" {
|
||||||
|
oldVal = fmt.Sprintf("\"PANEL_DB_USER_PASSWORD\":\"%v\"", appInstall.Password)
|
||||||
|
newVal = fmt.Sprintf("\"PANEL_DB_USER_PASSWORD\":\"%v\"", value)
|
||||||
|
_ = appInstallRepo.BatchUpdateBy(map[string]interface{}{
|
||||||
|
"param": strings.ReplaceAll(appInstall.Param, oldVal, newVal),
|
||||||
|
"env": strings.ReplaceAll(appInstall.Env, oldVal, newVal),
|
||||||
|
}, commonRepo.WithByID(appInstall.ID))
|
||||||
}
|
}
|
||||||
if param == "port" {
|
if param == "port" {
|
||||||
oldVal = fmt.Sprintf("\"PANEL_APP_PORT_HTTP\":%v", appInstall.Port)
|
oldVal = fmt.Sprintf("\"PANEL_APP_PORT_HTTP\":%v", appInstall.Port)
|
||||||
|
@ -58,7 +58,7 @@ const checkDBName = (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.dbName')));
|
callback(new Error(i18n.global.t('commons.rule.dbName')));
|
||||||
} else {
|
} else {
|
||||||
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9_.-]{0,30}$/;
|
const reg = /^[a-zA-Z0-9\u4e00-\u9fa5]{1}[a-zA-Z0-9_.\u4e00-\u9fa5-]{0,16}$/;
|
||||||
if (!reg.test(value) && value !== '') {
|
if (!reg.test(value) && value !== '') {
|
||||||
callback(new Error(i18n.global.t('commons.rule.dbName')));
|
callback(new Error(i18n.global.t('commons.rule.dbName')));
|
||||||
} else {
|
} else {
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
|||||||
requiredSelect: 'Please select the required fields',
|
requiredSelect: 'Please select the required fields',
|
||||||
commonName: 'Support English, Chinese, numbers, .-, and _ length 1-30',
|
commonName: 'Support English, Chinese, numbers, .-, and _ length 1-30',
|
||||||
simpleName: 'Support English, numbers and _ length 1-30',
|
simpleName: 'Support English, numbers and _ length 1-30',
|
||||||
dbName: 'Support English, numbers, .-, and _ length 1-30',
|
dbName: 'Support English, Chinese, numbers, .-, and _ length 1-16',
|
||||||
imageName: 'Support English, Chinese, numbers, :.-_, length 1-30',
|
imageName: 'Support English, Chinese, numbers, :.-_, length 1-30',
|
||||||
complexityPassword:
|
complexityPassword:
|
||||||
'Please enter a password with more than 8 characters and must contain letters, digits, and special symbols',
|
'Please enter a password with more than 8 characters and must contain letters, digits, and special symbols',
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
|||||||
requiredSelect: '请选择必选项',
|
requiredSelect: '请选择必选项',
|
||||||
commonName: '支持英文、中文、数字、.-和_,长度1-30',
|
commonName: '支持英文、中文、数字、.-和_,长度1-30',
|
||||||
simpleName: '支持英文、数字、_,长度1-30',
|
simpleName: '支持英文、数字、_,长度1-30',
|
||||||
dbName: '支持英文、数字、:.-_,长度1-30',
|
dbName: '支持英文、中文、数字、.-_,长度1-16',
|
||||||
imageName: '支持英文、中文、数字、:.-_,长度1-30',
|
imageName: '支持英文、中文、数字、:.-_,长度1-30',
|
||||||
complexityPassword: '请输入 8 位以上、必须含有字母、数字、特殊符号的密码',
|
complexityPassword: '请输入 8 位以上、必须含有字母、数字、特殊符号的密码',
|
||||||
commonPassword: '请输入 6 位以上长度密码',
|
commonPassword: '请输入 6 位以上长度密码',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user