fill notify groups of events

This commit is contained in:
Ulric Qin 2022-03-22 15:36:51 +08:00
parent 8bdd35975e
commit 6d20b8ef72
1 changed files with 9 additions and 2 deletions

View File

@ -90,8 +90,15 @@ func alertCurEventsCardDetails(c *gin.Context) {
var f idsForm var f idsForm
ginx.BindJSON(c, &f) ginx.BindJSON(c, &f)
lst, err := models.AlertCurEventGetByIds(f.Ids) list, err := models.AlertCurEventGetByIds(f.Ids)
ginx.NewRender(c).Data(lst, err) if err == nil {
cache := make(map[int64]*models.UserGroup)
for i := 0; i < len(list); i++ {
list[i].FillNotifyGroups(cache)
}
}
ginx.NewRender(c).Data(list, err)
} }
// 列表方式,拉取活跃告警 // 列表方式,拉取活跃告警