Module: check_mk
Branch: master
Commit: b9c46db1545e5eb2ab00c03ffcfbf6530a18b1f6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b9c46db1545e5e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 5 12:20:01 2014 +0100
#1686 FIX Host renaming also updates explicit negated hosts in rules
---
.werks/1686 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.werks/1686 b/.werks/1686
new file mode 100644
index 0000000..74775c5
--- /dev/null
+++ b/.werks/1686
@@ -0,0 +1,9 @@
+Title: Host renaming also updates explicit negated hosts in rules
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417778380
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 53493b4..4a21bb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -210,6 +210,7 @@
* 1639 FIX: Interfaces with speed more than 10GBit/s can now be configured correctly
* 1633 FIX: Fix problem that attributes of new WATO folders have not been saved...
* 1634 FIX: Fix editing of cluster hosts in WATO: cluster-property no longer goes
lost...
+ * 1686 FIX: Host renaming also updates explicit negated hosts in rules
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 404c42e..1135dc6 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2229,6 +2229,7 @@ def mode_rename_host(phase):
return _("Rename %s %s") % (is_cluster and _("Cluster") or
_("Host"), hostname)
elif phase == "buttons":
+ global_buttons()
html.context_button(_("Host Properties"), make_link([("mode",
"edithost"), ("host", hostname)]), "back")
return
@@ -2281,6 +2282,9 @@ def rename_host_in_list(thelist, oldname, newname):
if element == oldname:
thelist[nr] = newname
did_rename = True
+ elif element == '!'+oldname:
+ thelist[nr] = '!'+newname
+ did_rename = True
return did_rename
def rename_host(host, newname):