Module: check_mk
Branch: master
Commit: 9b9afa8ab215a394e0797554be4d7847a626c578
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9b9afa8ab215a3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Feb 18 09:26:51 2013 +0100
FIX: fixed invalid links to hosts and services in BI tree view
Conflicts:
ChangeLog
web/htdocs/bi.py
---
ChangeLog | 5 ++++-
web/htdocs/bi.py | 4 ++--
web/htdocs/htmllib.py | 8 +++++---
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 50ff3a3..26a6d59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,8 +22,11 @@
* Configuration of datasource programs via dedicated rules
* New editor for Business Intelligence rules
+1.2.2b4:
+ BI:
+ * FIX: fixed invalid links to hosts and services in BI tree view
-1.2.2b3
+1.2.2b3:
Checks & Agents:
* FIX: Fixed date parsing code ignoring the seconds value in several checks
(ad_replication, cups_queues, heartbeat_crm, mssql_backup, smbios_sel)
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index d2005d3..05fe2f0 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1529,10 +1529,10 @@ def aggr_render_leaf(tree, show_host, bare = False):
# (4) CPU load (show_host == False, service != None)
if show_host or not service:
- host_url = "view.py?" + htmllib.urlencode_vars([("view_name",
"hoststatus"), ("site", site), ("host", host)])
+ host_url = html.makeuri([("view_name", "hoststatus"),
("site", site), ("host", host)], filename="view.py")
if service:
- service_url = "view.py?" +
htmllib.urlencode_vars([("view_name", "service"), ("site",
site), ("host", host), ("service", service)])
+ service_url = html.makeuri([("view_name", "service"),
("site", site), ("host", host), ("service", service)],
filename="view.py")
if show_host:
content += '<a href="%s">%s</a><b
class=bullet>♦</b>' % (host_url, host.replace(" ",
" "))
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 91bb250..dee2564 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -358,15 +358,17 @@ class html:
self.global_vars += varnames
# [('varname1', value1), ('varname2', value2) ]
- def makeuri(self, addvars, remove_prefix = None):
+ def makeuri(self, addvars, remove_prefix = None, filename=None):
vars = [ (v, self.var(v)) for v in self.req.vars if v[0] != "_" ]
if remove_prefix != None:
vars = [ i for i in vars if not i[0].startswith(remove_prefix) ]
vars = vars + addvars
+ if filename == None:
+ filename = self.req.myfile + ".py"
if vars:
- return self.req.myfile + ".py?" + urlencode_vars(vars)
+ return filename + "?" + urlencode_vars(vars)
else:
- return self.req.myfile + ".py"
+ return filename
def makeactionuri(self, addvars):
return self.makeuri(addvars + [("_transid", self.fresh_transid())])