Module: check_mk
Branch: master
Commit: d3dbcd694c11b6f639b612fa88270b43228d6f4f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3dbcd694c11b6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Sep 26 11:00:40 2013 +0200
Staleness: red color also for host staleness
---
web/plugins/views/painters.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 463f764..bb450e0 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -491,8 +491,8 @@ multisite_painters["svc_state_age"] = {
"sorter" : "stateage",
}
-def paint_checked(row):
- css, td = paint_age(row["service_last_check"],
row["service_has_been_checked"] == 1, 0)
+def paint_checked(what, row):
+ css, td = paint_age(row[what + "_last_check"], row[what +
"_has_been_checked"] == 1, 0)
if is_stale(row):
css += " staletime"
return css, td
@@ -502,7 +502,7 @@ multisite_painters["svc_check_age"] = {
"short" : _("Checked"),
"columns" : [ "service_has_been_checked",
"service_last_check" ],
"options" : [ "ts_format", "ts_date" ],
- "paint" : paint_checked,
+ "paint" : lambda row: paint_checked("service", row),
}
multisite_painters["svc_next_check"] = {
@@ -868,7 +868,7 @@ multisite_painters["host_check_age"] = {
"short" : _("Checked"),
"columns" : [ "host_has_been_checked",
"host_last_check" ],
"options" : [ "ts_format", "ts_date" ],
- "paint" : lambda row: paint_age(row["host_last_check"],
row["host_has_been_checked"] == 1, 0),
+ "paint" : lambda row: paint_checked("host", row),
}
multisite_painters["host_next_check"] = {