Module: check_mk
Branch: master
Commit: ed689a161938f320e574b012075e66c5cb207ce3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed689a161938f3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 24 18:23:58 2011 +0200
Dashboard: add links to PNP when using PNP graphs
---
ChangeLog | 1 +
web/htdocs/dashboard.py | 11 +++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cc238bd..8b6bb1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
Multisite:
* Dashboard: fix font size of service statistics table
* Dashboard: insert links to views into statistics
+ * Dashboard: add links to PNP when using PNP graphs
1.1.12b2:
Core, Setup, etc.:
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index f461580..1fbfa42 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -583,11 +583,14 @@ def render_pnpgraph(site, host, service=None, source=0):
service = "_HOST_"
if not site:
- base_url = defaults.url_prefix + "/pnp4nagios/index.php/"
+ base_url = defaults.url_prefix
else:
base_url = html.site_status[site]["site"]["url_prefix"]
-
- img_url = base_url +
"image?host=%s&srv=%s&view=0&source=%d&theme=multisite&_t=%d"
% \
+ base_url += "/pnp4nagios/index.php/"
+ var_part =
"?host=%s&srv=%s&view=0&source=%d&theme=multisite&_t=%d" %
\
(pnp_cleanup(host), pnp_cleanup(service), source, int(time.time()))
- html.write('<img src="%s">' % img_url)
+
+ pnp_url = base_url + "graph" + var_part
+ img_url = base_url + "image" + var_part
+ html.write('<a href="%s"><img border=0
src="%s"></a>' % (pnp_url, img_url))