Module: check_mk
Branch: master
Commit: 93d1da56703317dce502cb2dd957403a710c9581
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=93d1da56703317…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 7 14:05:48 2011 +0100
Fixed several exceptions when host ist marked as "do not monitor"
---
web/htdocs/wato.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 554b4f4..df9c82d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6546,7 +6546,7 @@ class SiteAttribute(Attribute):
default_value = default_site())
def paint(self, value, hostname):
- return "", self._choices_dict.get(value, value)
+ return "", self._choices_dict.get(value, _("(do not
monitor)"))
def render_input(self, value):
html.select("site", self._choices, value)
@@ -6630,15 +6630,15 @@ def global_replication_state():
def find_host_sites(site_ids, folder, hostname):
host = folder[".hosts"][hostname]
- if "site" in host:
+ if "site" in host and host["site"]:
site_ids.add(host["site"])
- else:
+ elif folder[".siteid"]:
site_ids.add(folder[".siteid"])
# Scan recursively for references to sites
# in folders and hosts
def find_folder_sites(site_ids, folder, include_folder = False):
- if include_folder:
+ if include_folder and folder[".siteid"]:
site_ids.add(folder[".siteid"])
load_hosts(folder)
for hostname in folder[".hosts"]: