From 0588d399116515d6ce48fc8696eaed932b28da7c Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Sat, 21 Aug 2021 21:52:08 +0800 Subject: [PATCH] bugfix: handle status when create alert_rule --- http/router_alert_rule.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/http/router_alert_rule.go b/http/router_alert_rule.go index 03254111..3953922a 100644 --- a/http/router_alert_rule.go +++ b/http/router_alert_rule.go @@ -32,7 +32,6 @@ type alertRuleForm struct { EnableEtime string `json:"enable_etime"` EnableDaysOfWeek string `json:"enable_days_of_week"` AlertDuration int `json:"alert_duration"` - RecoveryDuration int `json:"recovery_duration"` RecoveryNotify int `json:"recovery_notify"` Priority int `json:"priority"` NotifyChannels string `json:"notify_channels"` @@ -57,6 +56,7 @@ func alertRuleAdd(c *gin.Context) { Name: alertRule.Name, Type: alertRule.Type, Note: alertRule.Note, + Status: alertRule.Status, Expression: alertRule.Expression, AlertDuration: alertRule.AlertDuration, AppendTags: alertRule.AppendTags, @@ -132,7 +132,6 @@ func alertRulePut(c *gin.Context) { "enable_stime", "enable_etime", "enable_days_of_week", - "recovery_duration", "recovery_notify", "priority", "notify_channels",