[checkmk-commits] Check_MK Git: check_mk: Multisite: new painters host/svc_contact_groups

git version control git at mathias-kettner.de
Tue Aug 16 11:51:35 CEST 2011


Module: check_mk
Branch: master
Commit: a4a1b0b142d39230aa51da2cb9bda68b27c1d158
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4a1b0b142d39230aa51da2cb9bda68b27c1d158

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Tue Aug 16 11:40:49 2011 +0200

Multisite: new painters host/svc_contact_groups

Also added information about the contact groups
to the detail views.

---

 ChangeLog                     |    1 +
 web/plugins/views/builtin.py  |    2 ++
 web/plugins/views/painters.py |   15 +++++++++++++++
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index feccecc..0554719 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -82,6 +82,7 @@
     * WATO: Added new hook "active-changes" which calls the registered hosts
       with a dict of "dirty" hosts
     * Added column painter for host contacts
+    * Added column painters for contact groups, added those to detail views
     * Detail views of host/service now show contacts
     * Fix playing of sounds: All problem views now have play_sounds activated,
       all other deactivated.
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index 15ef3b7..7c2b86c 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -840,6 +840,7 @@ multisite_builtin_views.update({
                              ('host_group_memberlist', None),
                              ('host_parents', None),
                              ('host_childs', None),
+                             ('host_contact_groups', None),
                              ('host_contacts', None),
                              ('host_plugin_output', None),
                              ('host_perf_data', None),
@@ -1034,6 +1035,7 @@ multisite_builtin_views.update({
                           ('service_icons', None),
                           ('service_state', None),
                           ('svc_group_memberlist', None),
+                          ('svc_contact_groups', None),
                           ('svc_contacts', None),
                           ('svc_plugin_output', None),
                           ('svc_long_plugin_output', None),
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 9b976a0..db20f0c 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -545,6 +545,14 @@ multisite_painters["svc_contacts"] = {
     "paint" : lambda row: (None, ", ".join(row["service_contacts"]))
 }
 
+multisite_painters["svc_contact_groups"] = {
+    "title" : _("Service contact groups"),
+    "short" : _("Contact groups"),
+    "columns" : ["service_contact_groups"],
+    "paint" : lambda row: (None, ", ".join(row["service_contact_groups"]))
+}
+
+
 multisite_painters["service_description"] = {
     "title" : _("Service description"),
     "short" : _("Service"),
@@ -1167,6 +1175,13 @@ multisite_painters["host_contacts"] = {
     "paint" : lambda row: (None, ", ".join(row["host_contacts"]))
 }
 
+multisite_painters["host_contact_groups"] = {
+    "title" : _("Host contact groups"),
+    "short" : _("Contact groups"),
+    "columns" : ["host_contact_groups"],
+    "paint" : lambda row: (None, ", ".join(row["host_contact_groups"]))
+}
+
 multisite_painters["host_custom_notes"] = {
     "title" : _("Custom host notes"), 
     "short" : _("Notes"),



More information about the checkmk-commits mailing list