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

This commit is contained in:
Akkia
2022-09-13 04:01:08 +08:00
parent 222b87ec78
commit 32d15e116e
3 changed files with 19 additions and 5 deletions

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不为空