Module: check_mk
Branch: master
Commit: c090f44ca49a0cd2ca67c1650cc953295e944bac
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c090f44ca49a0c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 24 10:43:08 2014 +0100
FIX Move two last global settings of Event Console to proper places
---
.werks/678 | 9 +++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 61 +++++++++++++++++----------------
web/htdocs/wato.py | 6 +++-
4 files changed, 47 insertions(+), 30 deletions(-)
diff --git a/.werks/678 b/.werks/678
new file mode 100644
index 0000000..b3187f8
--- /dev/null
+++ b/.werks/678
@@ -0,0 +1,9 @@
+Title: Move two last global settings of Event Console to proper places
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390556556
+
+
diff --git a/ChangeLog b/ChangeLog
index bde65fd..f5d3076 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -221,6 +221,7 @@
* 0256 FIX: wato snapshots: snapshot restore no longer fails with older python
versions...
* 0433 FIX: Creating WATO lock during automations (like e.g. master to slave
syncs)...
* 0434 FIX: Fixed wrong count of failed hosts in bulk inventory mode...
+ * 0678 FIX: Move two last global settings of Event Console to proper places
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index dd7b71b..ce555ab 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1482,21 +1482,6 @@ if mkeventd_enabled:
)
register_configvar(group,
- "mkeventd_connect_timeout",
- Integer(
- title = _("Connect timeout to status socket"),
- help = _("When the Multisite GUI connects the socket of the event daemon
"
- "in order to retrieve information about current and historic
events "
- "then this timeout will be applied."),
- minvalue = 1,
- maxvalue = 120,
- default_value = 10,
- unit = "sec",
- ),
- domain = "multisite",
- )
-
- register_configvar(group,
"replication",
Optional(
Dictionary(
@@ -1675,20 +1660,6 @@ if mkeventd_enabled:
)
register_configvar(group,
- "mkeventd_pprint_rules",
- Checkbox(title = _("Pretty-Print rules in configuration file"),
- label = _("enable pretty-printing of rules"),
- help = _("When the WATO module of the Event Console saves rules to
the file "
- "<tt>mkeventd.d/wato/rules.mk</tt> it usually
prints the Python "
- "representation of the rules-list into one single line by
using the "
- "native Python code generator. Enabling this option
switches to <tt>pprint</tt>, "
- "which nicely indents everything. While this is a bit
slower for large "
- "rulesets it makes debugging and manual editing
simpler."),
- default_value = False),
- domain = "multisite",
- )
-
- register_configvar(group,
"actions",
vs_mkeventd_actions,
allow_reset = False,
@@ -1781,6 +1752,38 @@ if mkeventd_enabled:
domain = "mkeventd",
)
+ # A few settings for Multisite and WATO
+ register_configvar(_("Status GUI (Multisite)"),
+ "mkeventd_connect_timeout",
+ Integer(
+ title = _("Connect timeout to status socket of Event Console"),
+ help = _("When the Multisite GUI connects the socket of the event daemon
"
+ "in order to retrieve information about current and historic
events "
+ "then this timeout will be applied."),
+ minvalue = 1,
+ maxvalue = 120,
+ default_value = 10,
+ unit = "sec",
+ ),
+ domain = "multisite",
+ )
+
+ register_configvar(_("Configuration GUI (WATO)"),
+ "mkeventd_pprint_rules",
+ Checkbox(title = _("Pretty-Print rules in configuration file"),
+ label = _("enable pretty-printing of rules"),
+ help = _("When the WATO module of the Event Console saves rules to
the file "
+ "<tt>mkeventd.d/wato/rules.mk</tt> it usually
prints the Python "
+ "representation of the rules-list into one single line by
using the "
+ "native Python code generator. Enabling this option
switches to <tt>pprint</tt>, "
+ "which nicely indents everything. While this is a bit
slower for large "
+ "rulesets it makes debugging and manual editing
simpler."),
+ default_value = False),
+ domain = "multisite",
+ )
+
+
+
# Settings that should also be avaiable on distributed Sites that
# do not run an own eventd but want to query one or send notifications
# to one.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index dc5b503..0bcddd7 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6358,7 +6358,7 @@ def render_global_configuration_variables(default_values,
current_settings, show
groupnames.sort()
html.write('<div class=globalvars>')
for groupname in groupnames:
- forms.header(groupname, isopen=False)
+ header_is_painted = False # needed for omitting empty groups
for domain, varname, valuespec in g_configvar_groups[groupname]:
if not show_all and (not g_configvars[varname][4]
@@ -6371,6 +6371,10 @@ def render_global_configuration_variables(default_values,
current_settings, show
else:
continue
+ if not header_is_painted:
+ forms.header(groupname, isopen=False)
+ header_is_painted = True
+
defaultvalue = default_values.get(varname, valuespec.default_value())
edit_url = make_link([("mode", "edit_configvar"),
("varname", varname), ("site", html.var("site",
""))])