[checkmk-commits] Check_MK Git: check_mk: Valuespec: fixed exception in DropDownchoice(), Display help texts of Alternative()

git version control git at mathias-kettner.de
Thu Nov 8 14:33:48 CET 2012


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

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Thu Nov  8 14:28:32 2012 +0100

Valuespec: fixed exception in DropDownchoice(), Display help texts of Alternative()

---

 ChangeLog               |    2 ++
 web/htdocs/valuespec.py |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ad5fab6..b1ff70d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,8 @@
     * FIX: Fixed editing of icon_image rules
     * Added support of locked hosts and folders ( created by CMDB )
     * Logwatch: logwatch agents/plugins now with ok pattern support 
+    * Valuespec: Alternative Value Spec now shows helptext of its elements
+    * Valuespec: DropdownChoice, fixed exception on validate_datatype
 
     Checks & Agents:
     * New check mssql_counters.locks: Monitors locking related information of
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 44fefcc..1e6ea41 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -874,7 +874,7 @@ class DropdownChoice(ValueSpec):
             if val == value:
                 return
         raise MKUserError(varprefix, _("Invalid value %s, must be in %s") %
-            ", ".join([v for (v,t) in self.choices()]))
+            (value, ", ".join([v for (v,t) in self.choices()]))) 
 
 
 # Special conveniance variant for monitoring states
@@ -1606,6 +1606,7 @@ class Alternative(ValueSpec):
             else:
                 checked = vs == mvs
 
+            html.help(vs.help())
             title = vs.title()
             if not title and nr:
                 html.write("  ")



More information about the checkmk-commits mailing list