Module: check_mk
Branch: master
Commit: 34fd3086d09f701167a565e5a229c0d1236f42be
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=34fd3086d09f70…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 26 10:14:45 2016 +0100
#2998 FIX Fixed broken WATO rules where content is dynamically loaded
Rules like <i>Disabled checks</i> and <i>Deploy custom files with agent
(Windows)</i>
were no longer displaying any content. This has been fixed.
---
.werks/2998 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 7 +++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/2998 b/.werks/2998
new file mode 100644
index 0000000..6eda654
--- /dev/null
+++ b/.werks/2998
@@ -0,0 +1,11 @@
+Title: Fixed broken WATO rules where content is dynamically loaded
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1456477952
+
+Rules like <i>Disabled checks</i> and <i>Deploy custom files with agent
(Windows)</i>
+were no longer displaying any content. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 982d88c..86b2cdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,6 +66,7 @@
* 3179 FIX: Fix labelling of heartbeat interval for liveproxyd settings...
* 3180 FIX: Fix broken site specific globals and disabling of WATO in slave sites
* 3182 FIX: Fix bulk operations based on search result folder...
+ * 2998 FIX: Fixed broken WATO rules where content is dynamically loaded...
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index b599eb0..42eb62c 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1575,8 +1575,11 @@ class ListChoice(ValueSpec):
self._elements = self._choices
else:
self._elements = self._choices()
- else:
- self._elements = []
+ return
+
+ if self._loaded_at != id(html):
+ self._elements = self.get_elements()
+ self._loaded_at = id(html) # unique for each query!
def canonical_value(self):
return []