Skip to content

Commit

Permalink
fix: 解决病毒定时扫描校验国际化的问题 (#5856)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored Jul 18, 2024
1 parent f6c334b commit 16a3514
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions frontend/src/views/toolbox/clam/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 16a3514

Please sign in to comment.