aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/html.inc.php
diff options
context:
space:
mode:
authorPim van den Berg2009-10-25 15:03:13 +0100
committerPim van den Berg2009-10-25 15:04:49 +0100
commit847fb6b2a99a46440a50f702c950d6d720f693f9 (patch)
treed620a73e52a25eddead7ef00687d9acc70fbd4f3 /inc/html.inc.php
parentremove code duplication from function graphs_from_plugin (diff)
downloadapt-panopticon_cgp-847fb6b2a99a46440a50f702c950d6d720f693f9.zip
apt-panopticon_cgp-847fb6b2a99a46440a50f702c950d6d720f693f9.tar.gz
apt-panopticon_cgp-847fb6b2a99a46440a50f702c950d6d720f693f9.tar.bz2
apt-panopticon_cgp-847fb6b2a99a46440a50f702c950d6d720f693f9.tar.xz
make dynamic title more detailed
Include information in the title about the host, plugin, plugin instance, type and type instance.
Diffstat (limited to 'inc/html.inc.php')
-rw-r--r--inc/html.inc.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index 51e8b37..cbe3ad2 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -6,10 +6,7 @@ require_once 'inc/rrdtool.class.php';
6function html_start() { 6function html_start() {
7 global $CONFIG; 7 global $CONFIG;
8 8
9 if (isset($_GET['h'])) 9 $path = htmlentities(breadcrumbs());
10 $path = ' - '.htmlentities(ucfirst($_GET['h']));
11 if (isset($_GET['p']))
12 $path .= ' - '.htmlentities(ucfirst($_GET['p']));
13 10
14 echo <<<EOT 11 echo <<<EOT
15<!DOCTYPE HTML> 12<!DOCTYPE HTML>
@@ -60,4 +57,20 @@ function host_summary($hosts) {
60 echo "</table>\n"; 57 echo "</table>\n";
61} 58}
62 59
60
61function breadcrumbs() {
62 if (isset($_GET['h']))
63 $path = ' - '.ucfirst($_GET['h']);
64 if (isset($_GET['p']))
65 $path .= ' - '.ucfirst($_GET['p']);
66 if (isset($_GET['pi']))
67 $path .= ' - '.$_GET['pi'];
68 if (isset($_GET['t']) && isset($_GET['p']) && $_GET['t'] != $_GET['p'])
69 $path .= ' - '.$_GET['t'];
70 if (isset($_GET['ti']))
71 $path .= ' - '.$_GET['ti'];
72
73 return $path;
74}
75
63?> 76?>