Module: check_mk
Branch: master
Commit: 1f7a4b3546377aa43af743eb33ff0766d2735b59
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1f7a4b3546377a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Nov 6 09:54:09 2014 +0100
#1433 FIX Quicksearch: no longer shows an invalid search result when looking for multiple
hosts
The quicksearch used the wrong search filter for the given pattern:
<i>host</i>
instead of <i>host_regex</i>
---
.werks/1433 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/sidebar.py | 2 +-
web/plugins/sidebar/search.py | 2 +-
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/1433 b/.werks/1433
new file mode 100644
index 0000000..5f85ad6
--- /dev/null
+++ b/.werks/1433
@@ -0,0 +1,10 @@
+Title: Quicksearch: no longer shows an invalid search result when looking for multiple
hosts
+Level: 2
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415263841
+Class: fix
+
+The quicksearch used the wrong search filter for the given pattern:
<i>host</i>
+instead of <i>host_regex</i>
diff --git a/ChangeLog b/ChangeLog
index 38274fb..36ec748 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,7 @@
* 1482 FIX: Fix exception when editing a visual of type single host group...
* 1487 FIX: Fixed exception in Web GUI "Internal error:: name 'Filter'
is not defined" in manual setups (using setup.py)...
* 1488 FIX: Fixed wrong information showing up on "Host Group" and
"Service Group" views...
+ * 1433 FIX: Quicksearch: no longer shows an invalid search result when looking for
multiple hosts...
WATO:
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index ea9682c..a262c43 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -781,7 +781,7 @@ def search_url_tmpl(used_filters, row, exact = True):
# Default search templates
ty = plugin.get("dftl_url_tmpl", plugin.get("id"))
if ty == 'hosts':
- return
'view.py?view_name=searchhost&host=%(name)s&filled_in=filter'
+ return
'view.py?view_name=searchhost&host_regex=%(name)s&filled_in=filter'
elif ty == 'hostgroups':
return
'view.py?view_name=hostgroups&hostgroup_name=%(name)s&site=%(site)s'
elif ty == 'servicegroups':
diff --git a/web/plugins/sidebar/search.py b/web/plugins/sidebar/search.py
index 41b3976..2762fdb 100644
--- a/web/plugins/sidebar/search.py
+++ b/web/plugins/sidebar/search.py
@@ -175,7 +175,7 @@ def search_hosts_filter(filters, host_is_ip = False):
return lq_filter
def search_hosts_url_tmpl(used_filters, data, host_is_ip = False):
- filter_field = host_is_ip and "host_address=(%s)" or "host=(%s)"
% "|".join(map(lambda x: x[1], used_filters))
+ filter_field = host_is_ip and "host_address=(%s)" or
"host_regex=(%s)" % "|".join(map(lambda x: x[1], used_filters))
return 'view.py?view_name=searchhost&filled_in=filter&' +
filter_field
def search_host_service_filter(filters, host_is_ip = False):