Module: check_mk
Branch: master
Commit: d91704bac2920fc48abc4778c14ead6ed71e85fe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d91704bac2920f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 24 15:50:25 2014 +0100
New column painter for the last time a service was OK
This information is displayed in the details of a service.
---
.werks/683 | 8 ++++++++
ChangeLog | 1 +
web/plugins/views/builtin.py | 1 +
web/plugins/views/painters.py | 7 +++++++
4 files changed, 17 insertions(+)
diff --git a/.werks/683 b/.werks/683
new file mode 100644
index 0000000..0fb25b9
--- /dev/null
+++ b/.werks/683
@@ -0,0 +1,8 @@
+Title: New column painter for the last time a service was OK
+Level: 1
+Component: multisite
+Version: 1.2.5i1
+Date: 1390574993
+Class: feature
+
+This information is displayed in the details of a service.
diff --git a/ChangeLog b/ChangeLog
index 6da324c..198c205 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -153,6 +153,7 @@
* 0449 Show all custom variables of hosts and services in the detail views...
* 0665 Added mail notificaton method to custom user notification dialog...
* 0123 New time range filter for Downtimes and Comments...
+ * 0683 New column painter for the last time a service was OK...
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
* 0239 FIX: Fixed incorrect html formatting when displaying host or service
comments...
* 0307 FIX: Increased performance of multisite GUI with a large userbase...
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index c4cdfa8..1320e78 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -1274,6 +1274,7 @@ multisite_builtin_views.update({
('svc_notification_number', None),
('svc_check_type', None),
('svc_state_age', None),
+ ('svc_last_time_ok', None),
('svc_check_age', None),
('svc_next_check', None),
('svc_next_notification', None),
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index b91cf60..f018d14 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -532,6 +532,13 @@ multisite_painters["svc_next_check"] = {
"paint" : lambda row:
paint_future_time(row["service_next_check"]),
}
+multisite_painters["svc_last_time_ok"] = {
+ "title" : _("The last time the service was OK"),
+ "short" : _("Last OK"),
+ "columns" : [ "service_last_time_ok",
"service_has_been_checked" ],
+ "paint" : lambda row: paint_age(row["service_last_time_ok"],
row["service_has_been_checked"] == 1, 60 * 10),
+}
+
multisite_painters["svc_next_notification"] = {
"title" : _("The time of the next service notification"),
"short" : _("Next notification"),