feat: 触发报警后的通知支持仅发送一次

This commit is contained in:
Akkia committed 2022-09-13 04:01:08 +08:00
1 parent 710ad13f15
commit 8ae2de3882
3 files changed
+19 -5

No files matched your search

+2
View File
@@ -600,6 +600,7 @@ type alertRuleForm struct {
Name string
RulesRaw string
NotificationTag string
TriggerMode int
Enable string
}
@@ -642,6 +643,7 @@ func (ma *memberAPI) addOrEditAlertRule(c *gin.Context) {
r.RulesRaw = arf.RulesRaw
r.NotificationTag = arf.NotificationTag
enable := arf.Enable == "on"
r.TriggerMode = arf.TriggerMode
r.Enable = &enable
r.ID = arf.ID
//保证NotificationTag不为空