Module: check_mk
Branch: master
Commit: 49deef34fa6302042a5e0e1353539f7fd276fa41
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=49deef34fa6302…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Dec 13 11:35:46 2018 +0100
added WK6699: Rule and pack choices now always show the id in addition to the title
Change-Id: Ie837d52c824d960f2c894872b263673a051de0ea
---
.werks/6699 | 11 +++++++++++
cmk/gui/plugins/wato/bi.py | 7 +++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/.werks/6699 b/.werks/6699
new file mode 100644
index 0000000..8db52cd
--- /dev/null
+++ b/.werks/6699
@@ -0,0 +1,11 @@
+Title: BI configuration: Rule and pack choices now always show the id in addition to the
title
+Level: 1
+Component: bi
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1544603575
+
+
diff --git a/cmk/gui/plugins/wato/bi.py b/cmk/gui/plugins/wato/bi.py
index 9aa682e..d73625c 100644
--- a/cmk/gui/plugins/wato/bi.py
+++ b/cmk/gui/plugins/wato/bi.py
@@ -522,10 +522,9 @@ class ModeBI(WatoMode, BIManagement):
choices = []
for pack_id, pack in sorted(self._packs.iteritems()):
if self.may_use_rules_in_pack(pack):
- pack_choices = [
- (rule_id, rule["title"]) for rule_id, rule in
pack["rules"].iteritems()
- ]
- choices.append((pack_id, pack["title"],
+ pack_choices = [(rule_id, "%s (%s)" % (rule["title"],
rule["id"]))
+ for rule_id, rule in
pack["rules"].iteritems()]
+ choices.append((pack_id, "%s (%s)" % (pack["title"],
pack["id"]),
DropdownChoice(choices=sorted(pack_choices))))
return choices