mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
fix: 解决计划任务编辑报错的问题 (#3556)
This commit is contained in:
parent
1c1bc872a8
commit
009919f927
@ -171,7 +171,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\u4e00-\u9fa5]{1}[a-zA-Z0-9_.\u4e00-\u9fa5-]{0,64}$/;
|
const reg = /^[a-zA-Z0-9\u4e00-\u9fa5]{1}[a-zA-Z0-9_.\u4e00-\u9fa5-]{0,63}$/;
|
||||||
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 {
|
||||||
|
@ -815,7 +815,7 @@ const message = {
|
|||||||
target: 'Target',
|
target: 'Target',
|
||||||
targetHelper: 'Third-party backup accounts are maintained in panel settings.',
|
targetHelper: 'Third-party backup accounts are maintained in panel settings.',
|
||||||
retainCopies: 'Retain copies',
|
retainCopies: 'Retain copies',
|
||||||
retainCopiesHelper: 'Number of copies of execution records, log files, and backup files',
|
retainCopiesHelper: 'Retention of Execution Records',
|
||||||
cronSpecRule: 'Please enter a correct lifecycle',
|
cronSpecRule: 'Please enter a correct lifecycle',
|
||||||
perMonth: 'Every monthly',
|
perMonth: 'Every monthly',
|
||||||
perWeek: 'Every week',
|
perWeek: 'Every week',
|
||||||
|
@ -776,7 +776,7 @@ const message = {
|
|||||||
target: '備份到',
|
target: '備份到',
|
||||||
targetHelper: '第三方備份賬號在面板設置中維護',
|
targetHelper: '第三方備份賬號在面板設置中維護',
|
||||||
retainCopies: '保留份數',
|
retainCopies: '保留份數',
|
||||||
retainCopiesHelper: '執行記錄、日誌文件、備份文件保留份數',
|
retainCopiesHelper: '執行記錄保留份數',
|
||||||
cronSpecRule: '請輸入正確的執行周期',
|
cronSpecRule: '請輸入正確的執行周期',
|
||||||
perMonth: '每月',
|
perMonth: '每月',
|
||||||
perWeek: '每周',
|
perWeek: '每周',
|
||||||
|
@ -777,7 +777,7 @@ const message = {
|
|||||||
target: '备份到',
|
target: '备份到',
|
||||||
targetHelper: '第三方备份账号在面板设置中维护',
|
targetHelper: '第三方备份账号在面板设置中维护',
|
||||||
retainCopies: '保留份数',
|
retainCopies: '保留份数',
|
||||||
retainCopiesHelper: '执行记录、日志文件、备份文件保留份数',
|
retainCopiesHelper: '执行记录保留份数',
|
||||||
cronSpecRule: '请输入正确的执行周期',
|
cronSpecRule: '请输入正确的执行周期',
|
||||||
perMonth: '每月',
|
perMonth: '每月',
|
||||||
perWeek: '每周',
|
perWeek: '每周',
|
||||||
|
@ -332,7 +332,11 @@ const acceptParams = (params: DialogProps): void => {
|
|||||||
loadAppInstalls();
|
loadAppInstalls();
|
||||||
loadWebsites();
|
loadWebsites();
|
||||||
loadContainers();
|
loadContainers();
|
||||||
loadDatabases();
|
if (dialogData.value.rowData?.dbType) {
|
||||||
|
loadDatabases(dialogData.value.rowData.dbType);
|
||||||
|
} else {
|
||||||
|
loadDatabases('mysql');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const emit = defineEmits<{ (e: 'search'): void }>();
|
const emit = defineEmits<{ (e: 'search'): void }>();
|
||||||
|
|
||||||
@ -477,8 +481,8 @@ const hasHour = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadDatabases = async () => {
|
const loadDatabases = async (dbType: string) => {
|
||||||
const data = await listDbItems(dialogData.value.rowData.dbType);
|
const data = await listDbItems(dbType);
|
||||||
dbInfo.dbs = data.data || [];
|
dbInfo.dbs = data.data || [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user