mirror of
https://github.com/Luzifer/mondash.git
synced 2024-12-22 12:01:19 +00:00
Fix typo in status check
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
616a2c9c8b
commit
fd9f992985
1 changed files with 4 additions and 4 deletions
|
@ -189,13 +189,13 @@ func (dm dashboardMetric) StatisticalStatus() string {
|
|||
|
||||
switch {
|
||||
case mult > 4:
|
||||
return "Critical"
|
||||
return metricStatusStringMapping[metricStatusCritical]
|
||||
|
||||
case mult > 3:
|
||||
return "Warning"
|
||||
return metricStatusStringMapping[metricStatusWarning]
|
||||
|
||||
default:
|
||||
return "OK"
|
||||
return metricStatusStringMapping[metricStatusOK]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -322,7 +322,7 @@ func (dm dashboardMetric) IsValid() (bool, string) {
|
|||
return false, "Freshness not in range 0 < x < 640800"
|
||||
}
|
||||
|
||||
if !str.StringInSlice(dm.Status, []string{"OK", "Warning", "Critical", "Unknowm"}) {
|
||||
if !str.StringInSlice(dm.Status, metricStatusStringMapping) {
|
||||
return false, "Status not allowed"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue