fix: 解决计划任务编辑报错的问题 (#3556)

pull/3558/head
ssongliu 11 months ago committed by GitHub
parent 1c1bc872a8
commit 009919f927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save