Module: check_mk
Branch: master
Commit: 22e8b5f506199d59c6e29594cf729669e0ecab5f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=22e8b5f506199d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 20 16:51:18 2015 +0200
#2297 Cleanup global settings, rename sections, remove obsolete settings
The <i>Global Settings</i> of WATO have been cleaned up a bit. The sections
have been renamed to be more self-explanatory. The order has been made more
useful. And some useless settings have been removed (they still keep working
if you have changed them from the defaults).
---
.f12 | 6 +++---
.werks/2297 | 12 ++++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 3 ++-
web/htdocs/wato.py | 13 +++++--------
web/plugins/wato/check_mk_configuration.py | 20 ++++++--------------
web/plugins/wato/globals_notification.py | 3 ++-
7 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/.f12 b/.f12
index 474b3f4..c3401a1 100644
--- a/.f12
+++ b/.f12
@@ -12,9 +12,9 @@ sudo mv /tmp/check_mk_templates.cfg /omd/sites/$SITE/etc/nagios/conf.d
for dir in doc web modules checks checkman mkeventd notifications agents livestatus
pnp-templates
do
- echo "*******************************************************"
- echo "VERZEICHNIS $dir **********************************"
- echo "*******************************************************"
+ echo -e '\033[1;34m'
+ figlet "** $dir **"
+ echo -e '\033[0m'
cd $dir
if bash .f12 ; then
echo "OK."
diff --git a/.werks/2297 b/.werks/2297
new file mode 100644
index 0000000..2b520e0
--- /dev/null
+++ b/.werks/2297
@@ -0,0 +1,12 @@
+Title: Cleanup global settings, rename sections, remove obsolete settings
+Level: 2
+Component: wato
+Compatible: compat
+Version: 1.2.7i1
+Date: 1432133360
+Class: feature
+
+The <i>Global Settings</i> of WATO have been cleaned up a bit. The sections
+have been renamed to be more self-explanatory. The order has been made more
+useful. And some useless settings have been removed (they still keep working
+if you have changed them from the defaults).
diff --git a/ChangeLog b/ChangeLog
index be4552e..55cfb0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -468,6 +468,7 @@
* 2176 One custom icon or action can be configured per process/service...
* 2250 Added download page for shipped agents and plugins...
* 2264 WATO Web API: new function get_all_hosts (returns all host attributes)
+ * 2297 Cleanup global settings, rename sections, remove obsolete settings...
* 1761 FIX: Ruleset search is now consistent for host & serviceparameters and
manual checks
* 1765 FIX: Fixed bug when generating nagvis backends while having sites with
livestatus proxy configured...
* 1789 FIX: Fix preview of passive checks in WATO list of services
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index 32587b8..6cb2e8d 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -2081,6 +2081,7 @@ if mkeventd_enabled:
register_configvar_domain("mkeventd", mkeventd_config_dir,
pending = lambda msg: log_mkeventd('config-change', msg),
in_global_settings = False)
group = _("Event Console")
+ g_configvar_order[group] = 18
register_configvar(group,
"remote_status",
@@ -2458,7 +2459,7 @@ if mkeventd_enabled:
# 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.
-group = _("Notification")
+group = _("Notifications")
register_configvar(group,
"mkeventd_notify_contactgroup",
GroupSelection(
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4f92a80..e63226b 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7425,9 +7425,9 @@ def mode_globalvars(phase):
if phase == "title":
if search:
- return _("Global configuration settings matching %s") %
html.attrencode(search)
+ return _("Global Settings matching %s") % html.attrencode(search)
else:
- return _("Global configuration settings for Check_MK")
+ return _("Global Settings")
elif phase == "buttons":
global_buttons()
@@ -7458,10 +7458,6 @@ def mode_globalvars(phase):
c = True # no confirmation for direct toggle
if c:
- # if action == "reset":
- # del current_settings[varname]
- # msg = _("Resetted configuration variable %s to its
default.") % varname
- # else:
if varname in current_settings:
current_settings[varname] = not current_settings[varname]
else:
@@ -7489,7 +7485,7 @@ def mode_globalvars(phase):
def render_global_configuration_variables(default_values, current_settings,
show_all=False, search=None):
groupnames = g_configvar_groups.keys()
- groupnames.sort()
+ groupnames.sort(cmp=lambda a,b: cmp(g_configvar_order.get(a, 999),
g_configvar_order.get(b, 999)))
search_form(_("Search for settings:"))
@@ -18917,9 +18913,10 @@ def load_plugins():
load_notification_table()
- global g_configvars, g_configvar_groups
+ global g_configvars, g_configvar_groups, g_configvar_order
g_configvars = {}
g_configvar_groups = {}
+ g_configvar_order = {}
global g_rulegroups, g_rulespecs, g_rulespec_group, g_rulespec_groups
g_rulegroups = {}
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 63be0c4..3bdfea7 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -37,6 +37,7 @@
# '----------------------------------------------------------------------'
group = _("User Interface")
+g_configvar_order[group] = 20
register_configvar(group,
"debug",
@@ -610,6 +611,7 @@ register_configvar(group,
# '----------------------------------------------------------------------'
group = _("Administration Tool (WATO)")
+g_configvar_order[group] = 25
register_configvar(group,
"wato_max_snapshots",
@@ -723,6 +725,7 @@ register_configvar(group,
# '----------------------------------------------------------------------'
group = _("User Management")
+g_configvar_order[group] = 40
register_configvar(group,
"user_connectors",
@@ -1187,7 +1190,8 @@ register_configvar(group,
# | Operation mode of Check_MK |
# '----------------------------------------------------------------------'
-group = _("Operation mode of Check_MK")
+group = _("Execution of checks")
+g_configvar_order[group] = 10
register_configvar(group,
@@ -1308,19 +1312,6 @@ register_configvar(group,
need_restart = True)
-register_configvar(group,
- "check_submission",
- DropdownChoice(
- title = _("Check submission method"),
- help = _("If you set this to <b>Nagios command pipe</b>, then
Check_MK will write its "
- "check results into the Nagios command pipe. This is the classical
way. "
- "Choosing <b>Create check files</b> "
- "skips one phase in the Nagios core and directly creates Nagios
check files. "
- "This reduces the overhead but might not be compatible with other
monitoring "
- "cores."),
- choices = [ ("pipe", _("Nagios command pipe")),
- ("file", _("Create check files")) ]),
- need_restart = True)
register_configvar(group,
"check_mk_perfdata_with_times",
@@ -1383,6 +1374,7 @@ register_configvar(group,
)
group = _("Service discovery")
+g_configvar_order[group] = 4
register_configvar(group,
"inventory_check_interval",
diff --git a/web/plugins/wato/globals_notification.py
b/web/plugins/wato/globals_notification.py
index 7f73b01..e37eb32 100644
--- a/web/plugins/wato/globals_notification.py
+++ b/web/plugins/wato/globals_notification.py
@@ -29,7 +29,8 @@
# TODO: Remove all configuration for legacy-Email to deprecated, or completely
# remove from WATO.
-group = _("Notification")
+group = _("Notifications")
+g_configvar_order[group] = 15
register_configvar(group,
"enable_rulebased_notifications",