update alert severity
This commit is contained in:
parent
7864a482b7
commit
a7cc47ec0b
|
@ -71,7 +71,9 @@ type ConditionResultItem struct {
|
||||||
type Severity string
|
type Severity string
|
||||||
|
|
||||||
var SeverityWeights = map[string]int{
|
var SeverityWeights = map[string]int{
|
||||||
"warning": 1,
|
"info": 1,
|
||||||
"error": 2,
|
"low": 2,
|
||||||
"critical": 3,
|
"medium": 3,
|
||||||
|
"high": 4,
|
||||||
|
"critical": 5,
|
||||||
}
|
}
|
|
@ -132,7 +132,7 @@ func (h *AlertAPI) getAlertMessageStats(w http.ResponseWriter, req *http.Request
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, status := range []string{"warning", "error", "critical"} {
|
for _, status := range []string{"info", "low","medium","high", "critical"} {
|
||||||
if _, ok := statusCounts[status]; !ok {
|
if _, ok := statusCounts[status]; !ok {
|
||||||
statusCounts[status] = 0
|
statusCounts[status] = 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue