Module: check_mk
Branch: master
Commit: 602327ebaac938ffad81e396fccfe4e5120a4017
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=602327ebaac938…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Oct 10 08:52:05 2012 +0200
FIX: Fixed editing of icon_image rules
---
ChangeLog | 5 +++--
web/plugins/wato/check_mk_configuration.py | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1b8c420..b647584 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,10 +40,11 @@
WATO:
* Added progress indicator in single site WATO "Activate Changes"
+ * Users & Contacts: Case-insensitive sorting of 'Full name' column
* FIX: Implemented basic non HTTP 200 status code response handling in interactive
progress dialogs (e.g. bulk inventory mode)
- * Users & Contacts: Case-insensitive sorting of 'Full name' column
-
+ * FIX: Fixed editing of icon_image rules
+
Checks & Agents:
* New check mssql_counters.locks: Monitors locking related information of
MSSQL tablespaces
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index a54857d..d8e0156 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1014,6 +1014,8 @@ class MonitoringIcon(ValueSpec):
return icons
def render_input(self, varprefix, value):
+ if value is None:
+ value = ""
num_columns = 12
html.write("<table>")
for nr, filename in enumerate([""] + self.available_icons()):
@@ -1039,12 +1041,12 @@ class MonitoringIcon(ValueSpec):
def from_html_vars(self, varprefix):
nr = int(html.var(varprefix))
if nr == 0:
- return ""
+ return None
else:
return self.available_icons()[nr-1]
def validate_datatype(self, value, varprefix):
- if type(value) != str:
+ if value is not None and type(value) != str:
raise MKUserError(varprefix, _("The type is %s, but should be str")
%
type(value))