mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
fix(backend): ignore alerts without alertmanager
This commit is contained in:
committed by
Łukasz Mierzwa
parent
ee718cff23
commit
fe6d5746ab
@@ -243,7 +243,6 @@ func alerts(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
if !validFilters || (slices.BoolInSlice(results, true) && !slices.BoolInSlice(results, false)) {
|
||||
matches++
|
||||
|
||||
blockedAMs := map[string]bool{}
|
||||
for _, am := range alert.Alertmanager {
|
||||
@@ -263,6 +262,11 @@ func alerts(c *gin.Context) {
|
||||
}
|
||||
alert.Alertmanager = ams
|
||||
}
|
||||
if len(alert.Alertmanager) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
matches++
|
||||
|
||||
alertGridLabelValues := map[string]bool{}
|
||||
switch gridLabel {
|
||||
|
||||
Reference in New Issue
Block a user