Module: check_mk
Branch: master
Commit: 8371d05c551c8fa51111c7b442a7af97a93e381c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8371d05c551c8f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 26 16:08:02 2011 +0200
WATO: FIX: add host tags to effective attributes
---
web/htdocs/wato.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5afddd5..cd37e8a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2645,6 +2645,8 @@ def declare_host_tag_attributes():
if configured_host_tags != config.host_tags:
# Remove host tag attributes from list, if existing
host_attributes = [ attr for attr in host_attributes if not
attr.name().startswith("tag_") ]
+
+ # Also remove those attributes from the speed-up dictionary host_attribute
for attr in host_attribute.values():
if attr.name().startswith("tag_"):
del host_attribute[attr.name()]
@@ -2972,13 +2974,15 @@ class API:
# Get all effective data of a host. The_file must be returned by get_file()
def get_host(self, the_file, hostname):
+ declare_host_tag_attributes()
host = the_file["hosts"][hostname]
eff = effective_attributes(host, the_file)
eff["name"] = hostname
return eff
- # Return displayable information about host
+ # Return displayable information about host (call with with result vom get_host())
def get_host_painted(self, host):
+ declare_host_tag_attributes()
result = []
for attr in host_attributes:
attrname = attr.name()