Module: check_mk
Branch: master
Commit: 3a19e6051b940f81d12ca147660bc8aeb3e19180
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a19e6051b940f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 27 10:45:43 2016 +0100
#2966 FIX Quicksearch: Fixed sorting of results when not only searching for hosts
---
.bugs/2285 | 7 +++++--
.werks/2966 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/sidebar.py | 3 ++-
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.bugs/2285 b/.bugs/2285
index 953d192..e9a4ca3 100644
--- a/.bugs/2285
+++ b/.bugs/2285
@@ -1,8 +1,11 @@
Title: "Add to visual" in views does not honor user provided filter vars
Component: multisite
-State: open
+Class: nastiness
+State: done
Date: 2015-01-19 16:04:58
Targetversion: 1.2.5i1
-Class: nastiness
It only cares about the filter values configured in the view.
+
+2016-01-27 10:34:29: changed state open -> done
+has already been fixed.
diff --git a/.werks/2966 b/.werks/2966
new file mode 100644
index 0000000..41fae1d
--- /dev/null
+++ b/.werks/2966
@@ -0,0 +1,9 @@
+Title: Quicksearch: Fixed sorting of results when not only searching for hosts
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453887925
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 3f059b5..d29ea7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -266,6 +266,7 @@
* 2947 FIX: LDAP: Simplified automatic sync logic...
* 2956 FIX: Fixed exception on "Availability of Single-Host Aggregations view
* 2965 FIX: Fixed HTML code shown in filter selection of favorite hosts filter
+ * 2966 FIX: Quicksearch: Fixed sorting of results when not only searching for hosts
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 0e4fc88..67de2f0 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -841,7 +841,8 @@ def search_livestatus(used_filters):
data.sort(cmp = sort_fctn)
return sorted_data
- if len(used_filters) == 1 and used_filters[0][0] != "hosts":
+ search_types = list(set(map(lambda x: x[0], used_filters)))
+ if len(used_filters) > 1 and search_types != ["hosts"]:
data = sort_data(data)
return data