Browse Source

fix: 解决病毒定时扫描校验国际化的问题 (#5856)

pull/5868/head v1.10.12-lts
ssongliu 4 months ago committed by GitHub
parent
commit
16a35141dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 18
      frontend/src/views/toolbox/clam/operate/index.vue

18
frontend/src/views/toolbox/clam/operate/index.vue

@ -202,7 +202,7 @@ const verifySpec = (rule: any, value: any, callback: any) => {
!Number.isInteger(item.second) ||
!Number.isInteger(item.week)
) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
switch (item.specType) {
@ -215,7 +215,7 @@ const verifySpec = (rule: any, value: any, callback: any) => {
item.minute < 0 ||
item.minute > 59
) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;
@ -228,7 +228,7 @@ const verifySpec = (rule: any, value: any, callback: any) => {
item.minute < 0 ||
item.minute > 59
) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;
@ -241,36 +241,36 @@ const verifySpec = (rule: any, value: any, callback: any) => {
item.minute < 0 ||
item.minute > 59
) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;
case 'perDay':
if (item.hour < 0 || item.hour > 23 || item.minute < 0 || item.minute > 59) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;
case 'perNHour':
if (item.hour < 0 || item.hour > 8784 || item.minute < 0 || item.minute > 59) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;
case 'perHour':
if (item.minute < 0 || item.minute > 59) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
case 'perNMinute':
if (item.minute < 0 || item.minute > 527040) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;
case 'perNSecond':
if (item.second < 0 || item.second > 31622400) {
callback(new Error(i18n.global.t('cronjob.specErr')));
callback(new Error(i18n.global.t('toolbox.clam.specErr')));
return;
}
break;

Loading…
Cancel
Save