Module: check_mk
Branch: master
Commit: acb5977beca04e39abd9228417cebb07e79f79e8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=acb5977beca04e…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Tue Mar 5 14:51:23 2019 +0100
7063 FIX Snapins like Micro Core Statistics were not shown for slave sites
Snapins like Micro Core Statistics were not shown for slave sites if the slave
site is connected via TCP and Event Console configuration is not pushed. This
has been fixed.
This fix was contributed by Björn Müller.
Change-Id: Ib2f35a5788556525b194dd47171e5305b2db1443
---
.werks/7063 | 14 ++++++++++++++
cmk/gui/plugins/sidebar/utils.py | 9 ++++-----
cmk/gui/sidebar.py | 2 +-
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/.werks/7063 b/.werks/7063
new file mode 100644
index 0000000..76cbbf7
--- /dev/null
+++ b/.werks/7063
@@ -0,0 +1,14 @@
+Title: Snapins like Micro Core Statistics were not shown for slave sites
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1551793732
+Class: fix
+
+Snapins like Micro Core Statistics were not shown for slave sites if the slave
+site is connected via TCP and Event Console configuration is not pushed. This
+has been fixed.
+
+This fix was contributed by Björn Müller.
diff --git a/cmk/gui/plugins/sidebar/utils.py b/cmk/gui/plugins/sidebar/utils.py
index 8ec1dee..e6b2ec9 100644
--- a/cmk/gui/plugins/sidebar/utils.py
+++ b/cmk/gui/plugins/sidebar/utils.py
@@ -314,15 +314,14 @@ def snapin_site_choice(ident, choices):
else:
only_sites = [site]
- site_choices = config.get_event_console_site_choices()
- if len(site_choices) <= 1:
+ if len(choices) <= 1:
return None
- site_choices = [
+ choices = [
("", _("All sites")),
- ] + site_choices
+ ] + choices
onchange = "cmk.sidebar.set_snapin_site(event, %s, this)" %
json.dumps(ident)
- html.dropdown("site", site_choices, deflt=site, onchange=onchange)
+ html.dropdown("site", choices, deflt=site, onchange=onchange)
return only_sites
diff --git a/cmk/gui/sidebar.py b/cmk/gui/sidebar.py
index d89faee..d6efa4a 100644
--- a/cmk/gui/sidebar.py
+++ b/cmk/gui/sidebar.py
@@ -859,7 +859,7 @@ def ajax_set_snapin_site():
site = html.request.var("site")
site_choices = dict([ ("", _("All sites")), ] \
- + config.get_event_console_site_choices())
+ + config.site_choices())
if site not in site_choices:
raise MKUserError(None, _("Invalid site"))