Module: check_mk
Branch: master
Commit: cf469d7c09f12114683ac926a0625ee1c2fa3cd4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cf469d7c09f121…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 28 10:22:01 2013 +0100
FIX Fixed assuming states of services with backslashes in descriptions
There was a bug which prevented assumind states for services with backslashes
in the service descriptions. In former versions, this was not possible. One
could click on the assumption icon, but after reloading the page, the
assumed state had not been set.
---
.werks/287 | 11 +++++++++++
ChangeLog | 3 +++
web/htdocs/bi.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/287 b/.werks/287
new file mode 100644
index 0000000..72e6b69
--- /dev/null
+++ b/.werks/287
@@ -0,0 +1,11 @@
+Title: Fixed assuming states of services with backslashes in descriptions
+Level: 1
+Component: bi
+Version: 1.2.3i7
+Date: 1385630366
+Class: fix
+
+There was a bug which prevented assumind states for services with backslashes
+in the service descriptions. In former versions, this was not possible. One
+could click on the assumption icon, but after reloading the page, the
+assumed state had not been set.
diff --git a/ChangeLog b/ChangeLog
index 0930012..f7c377c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -75,6 +75,9 @@
* 0032 FIX: Fixed problem when forwarding notification mails in windows...
* 0218 FIX: Fixed rendering of HTML mails for Outlook (at least 2013)...
+ BI:
+ * 0287 FIX: Fixed assuming states of services with backslashes in descriptions...
+
Reporting & Availability:
* 0051 Option for showing timeline directly in availability table...
* 0052 Visual colorization of availability according to levels...
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index fc6d18c..85a841c 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1531,7 +1531,7 @@ def render_assume_icon(site, host, service):
(_("Assume another state for this item (reload page to activate)"),
# MIST: DAS HIER MUSS verfünftig für Javascript encodiert werden.
# Das Ausgangsmaterial sind UTF-8 kodierte str-Objekte.
- site, host, service != None and service or '')
+ site, host, service != None and service.replace('\\', '\\\\')
or '')
current = str(ass).lower()
return u'<img state="%s" class=assumption %s
src="images/assume_%s.png">\n' % (current, mousecode, current)