Module: check_mk
Branch: master
Commit: f08eb97c9a845082b0dd4a462a162ecba6b791e9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f08eb97c9a8450…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 21 10:02:36 2019 +0100
7243 FIX Fixed wrong sorting of perfometers when some services have no metrics
When sorting a list of services by the perfometer column, this did not work
correctly in case there were services in this list that have no metrics at
all.
Change-Id: Iff8e759be15da00b1376c0156a1a523341f839e4
---
.werks/7243 | 13 +++++++++++++
cmk/gui/metrics.py | 3 +++
2 files changed, 16 insertions(+)
diff --git a/.werks/7243 b/.werks/7243
new file mode 100644
index 0000000..227f21c
--- /dev/null
+++ b/.werks/7243
@@ -0,0 +1,13 @@
+Title: Fixed wrong sorting of perfometers when some services have no metrics
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553091264
+
+When sorting a list of services by the perfometer column, this did not work
+correctly in case there were services in this list that have no metrics at
+all.
diff --git a/cmk/gui/metrics.py b/cmk/gui/metrics.py
index c8d7e1e..99d8eb5 100644
--- a/cmk/gui/metrics.py
+++ b/cmk/gui/metrics.py
@@ -283,6 +283,9 @@ class Perfometers(object):
return perfometers
def _perfometer_possible(self, perfometer, translated_metrics):
+ if not translated_metrics:
+ return False
+
if
self._skip_perfometer_by_trivial_metrics(perfometer["_required_names"],
translated_metrics):
return False