Module: check_mk
Branch: master
Commit: 44786f551d1f150d02bcd6e04f395b4a452ae692
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44786f551d1f15…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 17 15:48:29 2011 +0100
WATO: make hosts clickable in rule list
---
web/htdocs/wato.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c44654c..a0c7d16 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8919,7 +8919,15 @@ def render_conditions(ruleset, tagspecs, host_list, item_list,
varname, folder):
if host_list == []:
condition = _("This rule does <b>never</b> apply!")
elif host_list[-1] != ALL_HOSTS[0]:
- tt_list = [ "<tt><b>%s</b></tt>" % t for t
in host_list ]
+ tt_list = []
+ for h in host_list:
+ f = find_host(h)
+ if f:
+ uri = html.makeuri([("mode", "edithost"),
("folder", f[".path"]), ("host", h)])
+ host_spec = '<a href="%s">%s</a>' %
(uri, h)
+ else:
+ host_spec = h
+ tt_list.append("<tt><b>%s</b></tt>" %
host_spec)
if len(host_list) == 1:
condition = _("Host name is %s") % tt_list[0]
else: