update alert severity
This commit is contained in:
parent
7864a482b7
commit
a7cc47ec0b
|
@ -71,7 +71,9 @@ type ConditionResultItem struct {
|
|||
type Severity string
|
||||
|
||||
var SeverityWeights = map[string]int{
|
||||
"warning": 1,
|
||||
"error": 2,
|
||||
"critical": 3,
|
||||
"info": 1,
|
||||
"low": 2,
|
||||
"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 {
|
||||
statusCounts[status] = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue