Module: check_mk
Branch: master
Commit: 3d7e70b94ace08bf280fbb69f0ce53b728729f0f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d7e70b94ace08…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Nov 9 11:41:34 2015 +0100
#2447 FIX Fixed sorting of performancedata values with units
The sorting of performancedata values like
<i>rta=0.087ms;200.000;500.000;0;</i> was broken.
The sorter did not work when a unit was attached to the value.
---
.werks/2447 | 11 +++++++++++
ChangeLog | 1 +
web/plugins/views/sorters.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2447 b/.werks/2447
new file mode 100644
index 0000000..275f492
--- /dev/null
+++ b/.werks/2447
@@ -0,0 +1,11 @@
+Title: Fixed sorting of performancedata values with units
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1447065454
+
+The sorting of performancedata values like
<i>rta=0.087ms;200.000;500.000;0;</i> was broken.
+The sorter did not work when a unit was attached to the value.
diff --git a/ChangeLog b/ChangeLog
index ef83a5d..c603c85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,7 @@
* 2722 FIX: Fixed some icon links from views opening in dashlet frames instead of the
whole page...
* 2729 FIX: Hosts/Hostproblems snapin: Fixed wrong livestatus query when filtering
lists
* 2709 FIX: fixed exception when opening the action menu...
+ * 2447 FIX: Fixed sorting of performancedata values with units...
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/plugins/views/sorters.py b/web/plugins/views/sorters.py
index b668ecb..da30c81 100644
--- a/web/plugins/views/sorters.py
+++ b/web/plugins/views/sorters.py
@@ -167,7 +167,7 @@ declare_1to1_sorter("svc_staleness",
cmp_simple_number)
declare_1to1_sorter("svc_servicelevel", cmp_simple_number)
def cmp_perfdata_nth_value(r1, r2, n):
- return cmp(savefloat(get_perfdata_nth_value(r1, n)),
savefloat(get_perfdata_nth_value(r2, n)))
+ return cmp(savefloat(get_perfdata_nth_value(r1, n, True)),
savefloat(get_perfdata_nth_value(r2, n, True)))
multisite_sorters['svc_perf_val01'] = {
"title" : _("Service performance data - value number %02d" %
1),