Module: check_mk
Branch: master
Commit: 5b82c73eff28ff0765689005d1cca4f58c4acc58
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5b82c73eff28ff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 24 12:09:29 2015 +0200
#2224 FIX Fixed sorting in inventory based views
When sorting an inventory base table like <i>CPU related inventory of
hosts</i>
and the sort column was one of the inventory columns then the sorting was
wrong. This has been fixed.
---
.werks/2224 | 12 ++++++++++++
ChangeLog | 1 +
web/plugins/views/inventory.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2224 b/.werks/2224
new file mode 100644
index 0000000..fd5237a
--- /dev/null
+++ b/.werks/2224
@@ -0,0 +1,12 @@
+Title: Fixed sorting in inventory based views
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1429870112
+
+When sorting an inventory base table like <i>CPU related inventory of
hosts</i>
+and the sort column was one of the inventory columns then the sorting was
+wrong. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 99ce600..34307d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -527,6 +527,7 @@
* 2148 FIX: win_os: Fixed inventory of OS with older powershell versions
* 2108 FIX: win_bios win_disks win_system win_video: these inventory checks can now
handle colons in the output
* 2197 FIX: win_reg_uninstall: Fix exception in case of invalid output line...
+ * 2224 FIX: Fixed sorting in inventory based views...
1.2.6b1:
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index c6fcf1c..17b2742 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -46,7 +46,7 @@ def paint_host_inventory(row, invpath):
def cmp_inventory_node(a, b, invpath):
val_a = inventory.get(a["host_inventory"], invpath)
val_b = inventory.get(b["host_inventory"], invpath)
- return cmp(a, b)
+ return cmp(val_a, val_b)
inv_filter_info = {
"bytes" : { "unit" : _("MB"),
"scale" : 1024*1024 },