1
0
mirror of https://github.com/Luzifer/mondash.git synced 2024-09-19 17:02:58 +00:00

Fix typo in status check

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-05-19 09:47:07 +02:00
parent 616a2c9c8b
commit fd9f992985
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -189,13 +189,13 @@ func (dm dashboardMetric) StatisticalStatus() string {
switch { switch {
case mult > 4: case mult > 4:
return "Critical" return metricStatusStringMapping[metricStatusCritical]
case mult > 3: case mult > 3:
return "Warning" return metricStatusStringMapping[metricStatusWarning]
default: 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" 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" return false, "Status not allowed"
} }