Module: check_mk
Branch: master
Commit: 7c5ca8eacda26a122f6c507f0e8bfe2f7fd73b59
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7c5ca8eacda26a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 8 14:05:17 2018 +0100
5723 FIX Fixed broken sorting of services
The sorting was a case insentivitve text sorting at least since
1.4.0p7. This has now been fixed to work like as case insensitive
sort with the addition that texts and numbers are separated from
eachother before sorting.
Change-Id: I252cf3f98b6493b2050ed179ff980caf266035da
---
.werks/5723 | 14 ++++++++++++++
web/htdocs/views.py | 6 +++---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.werks/5723 b/.werks/5723
new file mode 100644
index 0000000..54d0135
--- /dev/null
+++ b/.werks/5723
@@ -0,0 +1,14 @@
+Title: Fixed broken sorting of services
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i3
+Date: 1518095011
+
+The sorting was a case insentivitve text sorting at least since
+1.4.0p7. This has now been fixed to work like as case insensitive
+sort with the addition that texts and numbers are separated from
+eachother before sorting.
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index ad80c3c..34a5e81 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -3001,9 +3001,9 @@ def cmp_simple_string(column, r1, r2):
return cmp_insensitive_string(v1, v2)
def cmp_num_split(column, r1, r2):
- c1 = r1[column]
- c2 = r2[column]
- return cmp_string_list(column, r1, r2)
+ c1 = num_split(r1[column].lower())
+ c2 = num_split(r2[column].lower())
+ return cmp(c1, c2)
def cmp_string_list(column, r1, r2):
v1 = ''.join(r1.get(column, []))