Module: check_mk
Branch: master
Commit: 8ba5e54da67dcf4f285b2bfb3832e262617c9ff5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8ba5e54da67dcf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 19 15:29:18 2016 +0200
3415 FIX Availability option "Visual levels for the availability" not longer
enables itself
When you edited an annotation then this option might enable itself. This has been fixed.
---
.werks/3415 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/3415 b/.werks/3415
new file mode 100644
index 0000000..0fd22b1
--- /dev/null
+++ b/.werks/3415
@@ -0,0 +1,10 @@
+Title: Availability option "Visual levels for the availability" not longer
enables itself
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1461072458
+
+When you edited an annotation then this option might enable itself. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 6cf9fc1..c382827 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -310,6 +310,7 @@
* 3331 FIX: Availability: avoid duplication of annotation when changing time while
editing
* 3332 FIX: Avoid falling back to annotation edit form when reloading page directly
after editing
* 3393 FIX: Availability annotations: also show annotations for hosts when showing
services
+ * 3415 FIX: Availability option "Visual levels for the availability" not
longer enables itself...
Event Console:
* 2999 The contact name is now included in Event Console notifications...
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index cc27f80..1bd034a 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -2524,7 +2524,8 @@ class Optional(ValueSpec):
return self._valuespec.value_to_text(value)
def from_html_vars(self, varprefix):
- if html.get_checkbox(varprefix + "_use") != self._negate:
+ checkbox_checked = html.get_checkbox(varprefix + "_use") == True # not
None or False
+ if checkbox_checked != self._negate:
return self._valuespec.from_html_vars(varprefix + "_value")
else:
return self._none_value