diff --git a/agent/utils/alert/alert.go b/agent/utils/alert/alert.go index 76b80154b..879a95cc0 100644 --- a/agent/utils/alert/alert.go +++ b/agent/utils/alert/alert.go @@ -290,7 +290,7 @@ func isWithinTimeRange(savedTimeString string) bool { func GetEmailContent(alertType string, params []dto.Param) string { switch GetCronJobType(alertType) { case "ssl": - return i18n.GetMsgWithMap("SSLAlert", map[string]interface{}{"day": getValueByIndex(params, "1")}) + return i18n.GetMsgWithMap("SSLAlert", map[string]interface{}{"num": getValueByIndex(params, "1"), "day": getValueByIndex(params, "2")}) case "siteEndTime": return i18n.GetMsgWithMap("WebSiteAlert", map[string]interface{}{"num": getValueByIndex(params, "1"), "day": getValueByIndex(params, "2")}) case "panelPwdEndTime": diff --git a/frontend/src/views/cronjob/cronjob/operate/index.vue b/frontend/src/views/cronjob/cronjob/operate/index.vue index 800242408..9d1b2c4bf 100644 --- a/frontend/src/views/cronjob/cronjob/operate/index.vue +++ b/frontend/src/views/cronjob/cronjob/operate/index.vue @@ -1377,12 +1377,11 @@ const onSubmit = async (formEl: FormInstance | undefined) => { form.exclusionRules = form.ignoreFiles.join(','); form.snapshotRule = { withImage: form.withImage, ignoreAppIDs: form.ignoreAppIDs }; - form.alertCount = form.hasAlert && isProductPro.value ? form.alertCount : 0; + form.alertCount = form.hasAlert ? form.alertCount : 0; form.alertMethod = form.alertMethodItems.join(','); - form.alertTitle = - form.hasAlert && isProductPro.value - ? i18n.global.t('cronjob.alertTitle', [i18n.global.t('cronjob.' + form.type), form.name]) - : ''; + form.alertTitle = form.hasAlert + ? i18n.global.t('cronjob.alertTitle', [i18n.global.t('cronjob.' + form.type), form.name]) + : ''; if (!form) return; if (isCreate.value) { diff --git a/frontend/src/views/setting/alert/dash/task/index.vue b/frontend/src/views/setting/alert/dash/task/index.vue index 6530c54a1..9660197b0 100644 --- a/frontend/src/views/setting/alert/dash/task/index.vue +++ b/frontend/src/views/setting/alert/dash/task/index.vue @@ -389,7 +389,7 @@ const rules = reactive({ cycle: [Rules.requiredInput, Rules.integerNumber, { validator: checkCycle, trigger: 'blur' }], count: [Rules.requiredInput, Rules.integerNumber, { validator: checkCount, trigger: 'blur' }], sendCount: [Rules.requiredInput, Rules.integerNumber, { validator: checkSendCount, trigger: 'blur' }], - method: [Rules.requiredSelect], + sendMethod: [Rules.requiredSelect], }); function checkCycle(rule: any, value: any, callback: any) { diff --git a/frontend/src/views/setting/alert/log/index.vue b/frontend/src/views/setting/alert/log/index.vue index c0bbbaeaf..8e3046921 100644 --- a/frontend/src/views/setting/alert/log/index.vue +++ b/frontend/src/views/setting/alert/log/index.vue @@ -4,7 +4,9 @@ - {{ $t('commons.button.sync') }} + + {{ $t('commons.button.sync') }} + {{ $t('xpack.alert.cleanLog') }} @@ -59,6 +61,7 @@ { loading.value = false; } } + await search(); }; onMounted(async () => {