[checkmk-commits] Check_MK Git: check_mk: FIX: Fixed generated manual check definitions for checks without items

git version control git at mathias-kettner.de
Thu Nov 22 10:46:07 CET 2012


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

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Thu Nov 22 10:46:05 2012 +0100

FIX: Fixed generated manual check definitions for checks without items
like ntp_time and tcp_conn_stats

---

 ChangeLog          |    4 ++++
 web/htdocs/wato.py |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1d51143..7465922 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,10 @@
     * Restructured cookie auth cookies (all auth cookies will be invalid
       after update -> all users have to login again)
     * Modularized login and cookie validation
+    
+    WATO:
+    * FIX: Fixed generated manual check definitions for checks without items
+      like ntp_time and tcp_conn_stats
 
 1.2.1i3:
     Core:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3d06cec..ae9291f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11109,6 +11109,13 @@ def register_check_parameters(subgroup, checkgroup, title, valuespec, itemspec,
             help = _("Please choose the check plugin")) ]
     if itemspec:
         elements.append(itemspec)
+    else:
+        # In case of static checks without check-item, add the fixed
+        # valuespec to add "None" as second element in the tuple
+        elements.append(FixedValue(
+            None,
+            totext = '',
+        ))
     if not valuespec:
         valuespec =\
             FixedValue(None,



More information about the checkmk-commits mailing list