Module: check_mk
Branch: master
Commit: a1d1bd14c6ae8e337a003b7d2a610ce33ff99929
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a1d1bd14c6ae8e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 1 15:23:31 2014 +0100
#1557 FIX Fix sorting of hostnames that only differ in lower/uppercaseness
---
.werks/1557 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/views.py | 4 +++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/1557 b/.werks/1557
new file mode 100644
index 0000000..cdc6da3
--- /dev/null
+++ b/.werks/1557
@@ -0,0 +1,9 @@
+Title: Fix sorting of hostnames that only differ in lower/uppercaseness
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417443788
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 527d7ab..447cec7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,6 +84,7 @@
* 1539 FIX: Fixed refreshing of PNP graphs in dashboards...
* 1543 FIX: Hosttag columns are now available right ater creating a tag...
* 1544 FIX: Fixed exception in complain phase in view editor...
+ * 1557 FIX: Fix sorting of hostnames that only differ in lower/uppercaseness
WATO:
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 8076d6a..e330b32 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2327,7 +2327,9 @@ def cmp_simple_string(column, r1, r2):
return cmp_insensitive_string(v1, v2)
def cmp_num_split(column, r1, r2):
- return cmp(num_split(r1[column]), num_split(r2[column]))
+ c1 = r1[column]
+ c2 = r2[column]
+ return cmp(num_split(c1) + (c1,), num_split(c2) + (c2,))
def cmp_string_list(column, r1, r2):
v1 = ''.join(r1.get(column, []))