Module: check_mk
Branch: master
Commit: c4561c0745a94c373eaebdcb987d4e2031e4cda5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c4561c0745a94c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 16 11:54:09 2014 +0200
FIX Do not loose site specific global settings anymore when chaning a site's
configuration
When you use distributed monitoring and have a site with site specific global settings
and afterwards edited the settings of the site connections then the global settings
got lost. This has now been fixed.
---
.werks/972 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 5 +++++
3 files changed, 17 insertions(+)
diff --git a/.werks/972 b/.werks/972
new file mode 100644
index 0000000..db4f675
--- /dev/null
+++ b/.werks/972
@@ -0,0 +1,11 @@
+Title: Do not loose site specific global settings anymore when chaning a site's
configuration
+Level: 2
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1400233980
+
+When you use distributed monitoring and have a site with site specific global settings
+and afterwards edited the settings of the site connections then the global settings
+got lost. This has now been fixed.
diff --git a/ChangeLog b/ChangeLog
index 997320d..f149fdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -94,6 +94,7 @@
* 0781 FIX: host diag page: fixed problem with update of diagnose subwindows...
* 0904 FIX: Fixed exception in host parameter overview...
* 0971 FIX: Fix missing authentication of PHP addons in D-WATO when activation mode
is reload...
+ * 0972 FIX: Do not loose site specific global settings anymore when chaning a
site's configuration...
Notifications:
* 0754 Allow users to disable their notifications completely...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 62dbb2b..7872015 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9836,6 +9836,11 @@ def mode_edit_site(phase):
if not new and "secret" in old_site:
new_site["secret"] = old_site["secret"]
+ # Do not forget to add those settings (e.g. "globals") that
+ # are not edited with this dialog
+ for key in old_site.keys():
+ if key not in new_site:
+ new_site[key] = old_site[key]
save_sites(sites)