Module: check_mk
Branch: master
Commit: c160cbf2a408575be1120c920390ef8fb84b2584
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c160cbf2a40857…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 4 12:25:28 2017 +0200
5178 Added option to hide edition/version from sidebar header
You can use the new global setting "Show Check_MK edition & version in
sidebar" to
hide the version and edition information from the sidebar header.
Change-Id: If9b5fb840185ef70d25ae16b16bcbe26be273d0d
---
.werks/5178 | 11 +++++++++++
web/htdocs/sidebar.py | 12 +++++++-----
web/plugins/config/builtin.py | 2 ++
web/plugins/wato/check_mk_configuration.py | 13 +++++++++++--
4 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/.werks/5178 b/.werks/5178
new file mode 100644
index 0000000..d405d36
--- /dev/null
+++ b/.werks/5178
@@ -0,0 +1,11 @@
+Title: Added option to hide edition/version from sidebar header
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1504520670
+Class: feature
+
+You can use the new global setting "Show Check_MK edition & version in
sidebar" to
+hide the version and edition information from the sidebar header.
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index adb6bcd..a784637 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -229,11 +229,13 @@ def sidebar_head():
html.open_a(href=config.user.get_attribute("start_url") or
config.start_url,
target="main", title=_("Go to main overview"))
html.img(src="images/sidebar_top.png", id_="side_bg")
- html.open_div(id_="side_version")
- html.open_a(href="version.py", target="main", title=_("Open
release notes"))
- html.write(get_check_mk_edition_title())
- html.br()
- html.write(cmk.__version__)
+
+ if config.sidebar_show_version_in_sidebar:
+ html.open_div(id_="side_version")
+ html.open_a(href="version.py", target="main",
title=_("Open release notes"))
+ html.write(get_check_mk_edition_title())
+ html.br()
+ html.write(cmk.__version__)
if werks.may_acknowledge():
num_unacknowledged_werks = werks.num_unacknowledged_incompatible_werks()
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index 86c45e9..32e6963 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -79,6 +79,8 @@ sidebar_show_scrollbar = False
# Enable regular checking for popup notifications
sidebar_notify_interval = None
+sidebar_show_version_in_sidebar = True
+
# Maximum number of results to show in quicksearch dropdown
quicksearch_dropdown_limit = 80
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 7cd1983..d3546f9 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -448,8 +448,6 @@ register_configvar(group,
domain = "multisite",
)
-
-
register_configvar(group,
"reschedule_timeout",
Float(title = _("Timeout for rescheduling checks in Multisite"),
@@ -462,6 +460,17 @@ register_configvar(group,
display_format = "%.1f"),
domain = "multisite")
+register_configvar(
+ group,
+ "sidebar_show_version_in_sidebar",
+ Checkbox(title = _("Show Check_MK edition & version in sidebar"),
+ label = _("Show the edition ad version"),
+ help = _("Use this option to hide the Check_MK edition and version
information from "
+ "the header of the sidebar."),
+ ),
+ domain = "multisite"
+)
+
register_configvar(group,
"sidebar_update_interval",
Float(title = _("Interval of sidebar status updates"),