mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 14:54:00 +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) {
|
||||
callback(new Error(i18n.global.t('commons.rule.dbName')));
|
||||
} 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 !== '') {
|
||||
callback(new Error(i18n.global.t('commons.rule.dbName')));
|
||||
} else {
|
||||
|
@ -815,7 +815,7 @@ const message = {
|
||||
target: 'Target',
|
||||
targetHelper: 'Third-party backup accounts are maintained in panel settings.',
|
||||
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',
|
||||
perMonth: 'Every monthly',
|
||||
perWeek: 'Every week',
|
||||
|
@ -776,7 +776,7 @@ const message = {
|
||||
target: '備份到',
|
||||
targetHelper: '第三方備份賬號在面板設置中維護',
|
||||
retainCopies: '保留份數',
|
||||
retainCopiesHelper: '執行記錄、日誌文件、備份文件保留份數',
|
||||
retainCopiesHelper: '執行記錄保留份數',
|
||||
cronSpecRule: '請輸入正確的執行周期',
|
||||
perMonth: '每月',
|
||||
perWeek: '每周',
|
||||
|
@ -777,7 +777,7 @@ const message = {
|
||||
target: '备份到',
|
||||
targetHelper: '第三方备份账号在面板设置中维护',
|
||||
retainCopies: '保留份数',
|
||||
retainCopiesHelper: '执行记录、日志文件、备份文件保留份数',
|
||||
retainCopiesHelper: '执行记录保留份数',
|
||||
cronSpecRule: '请输入正确的执行周期',
|
||||
perMonth: '每月',
|
||||
perWeek: '每周',
|
||||
|
@ -332,7 +332,11 @@ const acceptParams = (params: DialogProps): void => {
|
||||
loadAppInstalls();
|
||||
loadWebsites();
|
||||
loadContainers();
|
||||
loadDatabases();
|
||||
if (dialogData.value.rowData?.dbType) {
|
||||
loadDatabases(dialogData.value.rowData.dbType);
|
||||
} else {
|
||||
loadDatabases('mysql');
|
||||
}
|
||||
};
|
||||
const emit = defineEmits<{ (e: 'search'): void }>();
|
||||
|
||||
@ -477,8 +481,8 @@ const hasHour = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const loadDatabases = async () => {
|
||||
const data = await listDbItems(dialogData.value.rowData.dbType);
|
||||
const loadDatabases = async (dbType: string) => {
|
||||
const data = await listDbItems(dbType);
|
||||
dbInfo.dbs = data.data || [];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user