Module: check_mk
Branch: master
Commit: 813034c973c78a2989f2df6a3934488b03e3ba79
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=813034c973c78a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jun 17 10:26:27 2015 +0200
#2332 New icon for hosts/services that are out of their service period
The service period defines the times of the day that a service is expected
to by up. This is mainly being used for availability computations but can
also be used for filtering out unimportant things during non-work-hours.
---
.werks/2332 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/images/icon_outof_serviceperiod.png | Bin 0 -> 4480 bytes
web/plugins/icons/builtin.py | 21 +++++++++++++++++++--
4 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/.werks/2332 b/.werks/2332
new file mode 100644
index 0000000..04550f1
--- /dev/null
+++ b/.werks/2332
@@ -0,0 +1,11 @@
+Title: New icon for hosts/services that are out of their service period
+Level: 2
+Component: multisite
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434529503
+Class: feature
+
+The service period defines the times of the day that a service is expected
+to by up. This is mainly being used for availability computations but can
+also be used for filtering out unimportant things during non-work-hours.
diff --git a/ChangeLog b/ChangeLog
index 1ac8253..517a535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
Multisite:
* 2260 Improved load time of Check_MK GUI...
+ * 2332 New icon for hosts/services that are out of their service period...
* 2324 FIX: Add icon for those checks that cannot be rescheduled...
* 2261 FIX: Fixed wrong pnp template cache path in non OMD environments...
* 2262 FIX: Fixed deletion of foreign views/dashboards...
diff --git a/web/htdocs/images/icon_outof_serviceperiod.png
b/web/htdocs/images/icon_outof_serviceperiod.png
new file mode 100644
index 0000000..ff10824
Binary files /dev/null and b/web/htdocs/images/icon_outof_serviceperiod.png differ
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 9ed722f..824ec70 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -654,8 +654,6 @@ multisite_icons_and_actions['status_passive_checks'] = {
# | | |\ | (_) | |_| | _|_____| __/ __/ | | | (_) | (_| \__ \ |
# | |_| \_|\___/ \__|_|_|(_) |_| \___|_| |_|\___/ \__,_|___/ |
# | |
-# +----------------------------------------------------------------------+
-# | |
# '----------------------------------------------------------------------'
def paint_notification_periods(what, row, tags, host_custom_vars):
@@ -669,6 +667,25 @@ multisite_icons_and_actions['status_notification_period'] =
{
}
#.
+# .--Service Period------------------------------------------------------.
+# | ____ _ ____ |
+# | / ___| ___ _ ____ _(_) ___ ___ | _ \ ___ _ __ |
+# | \___ \ / _ \ '__\ \ / / |/ __/ _ \ | |_) / _ \ '__| |
+# | ___) | __/ | \ V /| | (_| __/ | __/ __/ | _ |
+# | |____/ \___|_| \_/ |_|\___\___| |_| \___|_|(_) |
+# | |
+# '----------------------------------------------------------------------'
+def paint_service_periods(what, row, tags, host_custom_vars):
+ if not row[what + "_in_service_period"]:
+ return 'outof_serviceperiod', _('Out of service period')
+
+multisite_icons_and_actions['status_service_period'] = {
+ 'columns': [ 'in_service_period' ],
+ 'paint': paint_service_periods,
+ 'toplevel': True,
+}
+
+#.
# .--Aggregations--------------------------------------------------------.
# | _ _ _ |
# | / \ __ _ __ _ _ __ ___ __ _ __ _| |_(_) ___ _ __ ___ |