Module: check_mk
Branch: master
Commit: e18451854725a52859817147c9216a67dd182d6c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e18451854725a5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jul 21 12:24:29 2014 +0200
quicksearch: multiple hostname matches now lead to the searchhost view instead of the
hosts view
When a quicksearch pattern matched multiple hosts the view hosts was shown.
This view also displayed all services for these hosts, which could lead
to plenty of (unwanted) output in the view.
<br>
The quicksearch feature has been changed in the following way<br>
<ul>
<li>If there are multiple host matches the searchhost view is displayed</li>
<li>If there is a single match the hosts view is displayed (this view also contains
the services)</li>
</ul>
Note: This also applies to special search patterns like <tt>h:localhost
h:otherhost</tt>
---
.werks/1085 | 19 +++++++++++++++++++
ChangeLog | 1 +
web/htdocs/sidebar.py | 2 +-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/1085 b/.werks/1085
new file mode 100644
index 0000000..4cec3c9
--- /dev/null
+++ b/.werks/1085
@@ -0,0 +1,19 @@
+Title: quicksearch: multiple hostname matches now lead to the searchhost view instead of
the hosts view
+Level: 1
+Component: multisite
+Version: 1.2.5i5
+Date: 1405937822
+Class: feature
+
+When a quicksearch pattern matched multiple hosts the view hosts was shown.
+This view also displayed all services for these hosts, which could lead
+to plenty of (unwanted) output in the view.
+<br>
+The quicksearch feature has been changed in the following way<br>
+
+<ul>
+<li>If there are multiple host matches the searchhost view is displayed</li>
+<li>If there is a single match the hosts view is displayed (this view also contains
the services)</li>
+</ul>
+
+Note: This also applies to special search patterns like <tt>h:localhost
h:otherhost</tt>
diff --git a/ChangeLog b/ChangeLog
index a09e7ae..97e98c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,6 +66,7 @@
* 1033 New Mutisite filter for the number of services a host has...
* 0949 quicksearch: now able to search for multiple hosts at once...
* 1052 SEC: index start URL can not be used to redirect to absolute URLs anymore...
+ * 1085 quicksearch: multiple hostname matches now lead to the searchhost view instead
of the hosts view...
* 0945 FIX: Sidebar snapin "Problem hosts": Now excludes hosts and services
in downtime
* 1036 FIX: doc/treasures/downtime: fix --url option, better error output
* 1074 FIX: Fix Virtual Host Tree snapin...
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 13786b4..91ba1c1 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -769,7 +769,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=hosts&host=%(name)s'
+ return
'view.py?view_name=searchhost&host=%(name)s&filled_in=filter'
elif ty == 'hostgroups':
return
'view.py?view_name=hostgroups&hostgroup_name=%(name)s&site=%(site)s'
elif ty == 'servicegroups':