Module: check_mk
Branch: master
Commit: a5d82c15b73cca0f6230826e5688fee2a4f0ac77
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a5d82c15b73cca…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Apr 13 10:26:44 2017 +0200
Fixed recently introduced exception on global setting page
Change-Id: I219f7153e6d1b53b3ec77b91e904a1f5f87f639c
---
web/htdocs/wato.py | 3 +++
web/htdocs/watolib.py | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 42683c7..30fb88c 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6721,6 +6721,9 @@ def render_global_configuration_variables(group_names,
default_values, current_s
else:
continue
+ if not configvar_show_in_global_settings(varname):
+ continue
+
help_text = valuespec.help() or ''
title_text = valuespec.title()
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index bc04187..598eed0 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -3157,6 +3157,13 @@ def configvar_order():
return g_configvar_order
+def configvar_show_in_global_settings(varname):
+ try:
+ return configvars()[varname][-1]
+ except KeyError:
+ return False
+
+
# domain is one of "check_mk", "multisite" or "nagios"
def register_configvar(group, varname, valuespec, domain="check_mk",
need_restart=False, allow_reset=True, in_global_settings=True):