add debug log

This commit is contained in:
Ulric Qin 2022-03-22 14:26:37 +08:00
parent 7c8c961aef
commit 106345ff49
1 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package router
import (
"fmt"
"sort"
"strings"
@ -46,6 +47,9 @@ func alertCurEventsCard(c *gin.Context) {
list, err := models.AlertCurEventGets(busiGroupId, stime, etime, severity, clusters, query, 10000, 0)
ginx.Dangerous(err)
fmt.Println(">>>> len:", len(list))
fmt.Println(">>>> list", list)
cardCount := make(map[string]int)
for _, event := range list {
title := event.GenCardTitle(rules)
@ -59,6 +63,8 @@ func alertCurEventsCard(c *gin.Context) {
sort.Strings(titles)
fmt.Println(">>>> titles:", titles)
cards := make([]AlertCard, len(titles))
for i := 0; i < len(titles); i++ {
cards[i] = AlertCard{