Module: check_mk
Branch: master
Commit: 830b80d19ed5d2ee5cc744f992eed075db608081
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=830b80d19ed5d2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 15 15:26:33 2016 +0100
Fixed config change handling of EC settings
---
tests/testlib/__init__.py | 2 +-
web/htdocs/wato.py | 11 ++++++++++-
web/plugins/wato/mkeventd.py | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 78391a0..2cfe8a0 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -812,7 +812,7 @@ class CMKEventConsole(CMKWebSession):
time.sleep(1)
new_t = web.site.live.query_value("GET eventconsolestatus\nColumns:
status_config_load_time\n")
- print "Old config load time: %s" % old_t
+ print "New config load time: %s" % new_t
assert new_t > old_t
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 94e023a..2cc9fe6 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6356,6 +6356,9 @@ def mode_edit_configvar(phase, what = 'globalvars'):
msg = HTML(_("Changed global configuration variable %s to %s.") \
% (varname, valuespec.value_to_text(new_value)))
+ if what == 'mkeventd':
+ need_restart = None
+
if siteid:
save_sites(configured_sites, activate=False)
add_change("edit-configvar", msg, sites=[siteid], domains=[domain],
need_restart=need_restart)
@@ -6363,7 +6366,13 @@ def mode_edit_configvar(phase, what = 'globalvars'):
return "edit_site_globals"
else:
save_configuration_settings(current_settings)
- add_change("edit-configvar", msg, domains=[domain],
need_restart=need_restart)
+
+
+ sites = None
+ if what == 'mkeventd':
+ sites = get_event_console_sync_sites()
+
+ add_change("edit-configvar", msg, domains=[domain],
need_restart=need_restart, sites=sites)
if what == 'mkeventd':
return 'mkeventd_config'
diff --git a/web/plugins/wato/mkeventd.py b/web/plugins/wato/mkeventd.py
index 732fab7..3ff1666 100644
--- a/web/plugins/wato/mkeventd.py
+++ b/web/plugins/wato/mkeventd.py
@@ -1777,7 +1777,7 @@ def mode_mkeventd_config(phase):
save_configuration_settings(current_settings)
- add_change("edit-configvar", msg, domains=[domain],
need_restart=need_restart)
+ add_ec_change("edit-configvar", msg)
if action == "_reset":
return "mkeventd_config", msg