Module: check_mk
Branch: master
Commit: b5b31f3291fda7785ca685def36238de4f6db8ba
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b5b31f3291fda7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 25 13:12:25 2016 +0100
#3182 FIX Fix bulk operations based on search result folder
If you searched for a host tag and then did a bulk operation like discovery
on the search result - the tag criteria was ignored and too many hosts
selected. This has been fixed.
---
.werks/3182 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
web/htdocs/watolib.py | 2 +-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/3182 b/.werks/3182
new file mode 100644
index 0000000..1700b9d
--- /dev/null
+++ b/.werks/3182
@@ -0,0 +1,12 @@
+Title: Fix bulk operations based on search result folder
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1456402291
+
+If you searched for a host tag and then did a bulk operation like discovery
+on the search result - the tag criteria was ignored and too many hosts
+selected. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 70e793c..420b99f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,6 +64,7 @@
* 3225 FIX: Fixed exception when renaming a host which is configured as parent on a
folder
* 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...
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2a2835b..e3b3e9a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -15564,7 +15564,7 @@ def configure_attributes(new, hosts, for_what, parent,
myself=None, without_attr
# has not set that attribute. In case of bulk edit we never lock: During bulk
edit no
# attribute ca be removed anyway.
- checkbox_name = "_change_%s" % attrname
+ checkbox_name = for_what + "_change_%s" % attrname
cb = html.get_checkbox(checkbox_name)
force_entry = False
disabled = False
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 0359164..27b3ebdc6 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -2766,7 +2766,7 @@ def collect_attributes(for_what, do_validate = True,
varprefix=""):
host = {}
for attr, topic in all_host_attributes():
attrname = attr.name()
- if not html.var("_change_%s" % attrname, False):
+ if not html.var(for_what + "_change_%s" % attrname, False):
continue
if do_validate and attr.needs_validation():