Module: check_mk
Branch: master
Commit: 35d1536e84aebf2513cd1c2d344b102a0762f13a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35d1536e84aebf…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 22 08:13:18 2016 +0100
Changes for "all sites" are only added to the currently configured replication sites
Change-Id: I1340e7dbd5b3262a80152b481cffbc8750fe49ce
---
web/htdocs/watolib.py | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 52a7239..cd0cff9 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -229,9 +229,9 @@ def add_change(action_name, text, obj=None, add_user=True, need_sync=None, need_
# pylint: disable=undefined-variable
need_to_bake_agents()
- # All sites in case no specific site is given
+ # All replication sites in case no specific site is given
if sites == None:
- sites = config.sitenames()
+ sites = ActivateChanges().activation_site_ids()
change_id = gen_id()
@@ -3863,11 +3863,17 @@ class ActivateChanges(object):
return self._repstatus.get(site_id, {}).get("changes", [])
- # Returns the list of sites that should be shown on activation page
+ # Returns the list of sites that are affected by WATO changes.
+ # these sites are shown on activation page and get change entries
+ # added during WATO changes.
def _activation_sites(self):
return [ (site_id, site) for site_id, site in config.configured_sites()
- if config.site_is_local(site_id)
- or site.get("replication") ]
+ if config.site_is_local(site_id)
+ or site.get("replication") ]
+
+
+ def activation_site_ids(self):
+ return [ s[0] for s in self._activation_sites() ]
# Returns the list of sites that should be used when activating all
@@ -3953,7 +3959,7 @@ class ActivateChanges(object):
def _affects_all_sites(self, change):
- return len(change["affected_sites"]) == len(config.sitenames())
+ return not set(change["affected_sites"]).symmetric_difference(set(self.activation_site_ids()))
def update_activation_time(self, site_id, ty, duration):
Module: check_mk
Branch: master
Commit: 55df84ebf6543bf0444c7324c2dffb6f3ad1b745
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55df84ebf6543b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 21 16:54:59 2016 +0100
4218 FIX Disabling replication with a site did not clear the changes for this site (1.4.0i3 regression)
Change-Id: I05fb47bd22d28b001d16bf02e9209f69a70ab03a
---
.werks/4218 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 10 ++++++----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/.werks/4218 b/.werks/4218
new file mode 100644
index 0000000..d4070d7
--- /dev/null
+++ b/.werks/4218
@@ -0,0 +1,9 @@
+Title: Disabling replication with a site did not clear the changes for this site (1.4.0i3 regression)
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i4
+Date: 1482335663
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 354153c..2bee0d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,7 @@
* 4217 WATO rules can now be moved via drag&drop...
* 4003 FIX: esx_vsphere_objects: fixed check parameters display bug during WATO service discovery
* 4146 FIX: Fixed broken "Global settings" when having the Event Console disabled via "omd config"
+ * 4218 FIX: Disabling replication with a site did not clear the changes for this site (1.4.0i3 regression)
Notifications:
* 4197 FIX: Fix sending notification to global fallback email address
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2951568..eb1dac4 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9323,11 +9323,13 @@ def mode_edit_site(phase):
# affecting all domains
add_change("edit-sites", msg, sites=[id], domains=ConfigDomain.enabled_domains())
+ # In case a site is not being replicated anymore, confirm all changes for this site!
+ if not repl:
+ clear_site_replication_status(id)
+
if id != config.omd_site():
- # On central site issue a change only for the GUI
- # NOTE: Was marking all to be restarted (ec and core) before, but I don't
- # think that this was really needed.
- add_change("edit-sites", msg, sites=[id], domains=[ConfigDomainGUI])
+ # On central site issue a change only affecting the GUI
+ add_change("edit-sites", msg, sites=[config.omd_site()], domains=[ConfigDomainGUI])
return "sites"
Module: check_mk
Branch: master
Commit: 6c9556a35a0f810dbaee38d3d43d626ec595588c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c9556a35a0f81…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 20 09:35:33 2016 +0100
Implemented element dragger in rule lists
The new generic GUI element can currently drag rows of data tables.
The user can move the rows around and release it again. Upon release,
the javascript code informs the backend about this change using an
ajax call.
Change-Id: I9e8ce7ea4d329eb1865d8dbf175b3badbe6e8d70
---
web/htdocs/htmllib.py | 15 ++++
web/htdocs/images/icon_drag.png | Bin 0 -> 2011 bytes
web/htdocs/js/checkmk.js | 171 ++++++++++++++++++++++++++++++++++++++++
web/htdocs/pages.css | 14 ++++
web/htdocs/wato.py | 29 +++----
web/htdocs/watolib.py | 24 +++++-
6 files changed, 232 insertions(+), 21 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=6c9556a35a…