Module: check_mk
Branch: master
Commit: 839b98fb1a50ea9ecc160fccb5bf050436354509
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=839b98fb1a50ea…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Mar 14 12:10:13 2019 +0100
WK7244: Restricted WATO sidebar snapin only show up to 10+ changes
Change-Id: Ie5882973ecdf23f525451113a4233b35599e9c7a
---
.werks/7244 | 17 +++++++++++++++++
cmk/gui/plugins/sidebar/wato.py | 6 +++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.werks/7244 b/.werks/7244
new file mode 100644
index 0000000..ce02d5e
--- /dev/null
+++ b/.werks/7244
@@ -0,0 +1,17 @@
+Title: Restricted WATO sidebar snapin only show up to 10+ changes
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1552391861
+
+The sidebar snapin and the WATO main page now use the same infotext to display the number
of pending changes.
+This infotext currently displays only up to 10 changes in detail. Any number above 10 is
abstracted with the text <tt>10+ changes</tt>.
+The reasoning behind this is, that there may be some sites with thousands of pending
changes.
+Determining the exact number generally takes some time, hereby slowing down the rending
of any page showing this infotext.
+
+
+The <tt>10+ changes</tt> limit may be lifted in the future, once a more
performant changes measurement functionality has been introduced.
diff --git a/cmk/gui/plugins/sidebar/wato.py b/cmk/gui/plugins/sidebar/wato.py
index 1bdeaa7..bdb5317 100644
--- a/cmk/gui/plugins/sidebar/wato.py
+++ b/cmk/gui/plugins/sidebar/wato.py
@@ -66,9 +66,9 @@ def render_wato(mini):
else:
iconlink(module.title, url, module.icon)
- num_pending = watolib.get_number_of_pending_changes()
- if num_pending:
- footnotelinks([(_("%d changes") % num_pending,
"wato.py?mode=changelog")])
+ pending_info = watolib.get_pending_changes_info()
+ if pending_info:
+ footnotelinks([(pending_info, "wato.py?mode=changelog")])
html.div('', class_="clear")