Module: check_mk
Branch: master
Commit: 69872191cbb10d71b91aac482571096c8e6a2cdb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=69872191cbb10d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 2 14:52:20 2012 +0200
WATO: do not loose host tags
When both using manual and WATO defined tags
---
ChangeLog | 2 ++
web/htdocs/wato.py | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1104226..b55b74b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,8 @@
* FIX: Fixed umlaut problem in host aliases and ip addresses created by WATO
* FIX: Fixed exception caused by validation problems during editing tags in WATO
* FIX: create sample config only if both rules.mk and hosttags.mk are missing
+ * FIX: do not loose host tags when both using WATO-configured and
+ manual ones (via multisite.mk)
1.2.0b2:
Core:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4d8676f..0c0ad5e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8608,7 +8608,8 @@ def mode_edit_hosttag(phase):
taggroup = tag_id, title, new_choices
hosttags.append(taggroup)
save_hosttags(hosttags, auxtags)
- config.wato_host_tags = hosttags
+ # Make sure, that all tags are active (also manual ones from main.mk)
+ config.load_config()
declare_host_tag_attributes()
rewrite_config_files_below(g_root_folder) # explicit host tags in
all_hosts
log_pending(SYNCRESTART, None, "edit-hosttags", _("Created
new host tag group '%s'") % tag_id)
@@ -8654,7 +8655,7 @@ def mode_edit_hosttag(phase):
message = rename_host_tags_after_confirmation(tag_id, operations)
if message:
save_hosttags(new_hosttags, auxtags)
- config.wato_host_tags = new_hosttags
+ config.load_config()
declare_host_tag_attributes()
rewrite_config_files_below(g_root_folder) # explicit host tags in
all_hosts
log_pending(SYNCRESTART, None, "edit-hosttags",
_("Edited host tag group %s (%s)") % (message, tag_id))