From 8bf309b808142d21aade10a40466403adf2001d7 Mon Sep 17 00:00:00 2001
From: Pim van den Berg
Date: Tue, 29 Sep 2009 19:56:44 +0200
Subject: layout improvement based on daniel's patch
The page is divided into a header, content and footer.
It is styled better and the header links to the main page.
Patch from Daniel von Fange (Leancoder):
http://pommi.nethuis.nl/storage/software/cgp/leancoder-css.cgp-v-0-1.patch
---
detail.php | 2 +-
host.php | 8 ++++----
inc/html.inc.php | 9 +++++++++
index.php | 4 ++--
layout/style.css | 28 +++++++++++++++++++++++++++-
5 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/detail.php b/detail.php
index 3512716..d8bd4eb 100644
--- a/detail.php
+++ b/detail.php
@@ -15,7 +15,7 @@ $seconds = $_GET['s'];
html_start();
-printf('
« %s
'."\n",
+printf('« %s
'."\n",
$CONFIG['weburl'].'/host.php?h='.htmlentities($host), $host
);
diff --git a/host.php b/host.php
index aee29d8..e8979aa 100644
--- a/host.php
+++ b/host.php
@@ -9,7 +9,7 @@ $splugin = $_GET['p'];
html_start();
-printf('« %s
'."\n", $CONFIG['weburl'], $host);
+printf('« %s
'."\n", $CONFIG['weburl'], $host);
$plugins = collectd_plugins($host);
@@ -21,7 +21,7 @@ if(!$plugins) {
# first the ones defined in overview
foreach($CONFIG['overview'] as $plugin) {
if (in_array($plugin, $plugins)) {
- printf("[-] %s
\n", $plugin);
+ printf("[-] %s
\n", $plugin);
graphs_from_plugin($host, $plugin);
}
}
@@ -31,10 +31,10 @@ foreach($plugins as $plugin) {
if (!in_array($plugin, $CONFIG['overview'])) {
$url = sprintf('%s'."\n", $CONFIG['weburl'], $host, $plugin, $plugin);
if ($splugin == $plugin) {
- printf("[-] %s
\n", $url);
+ printf("[-] %s
\n", $url);
graphs_from_plugin($host, $plugin);
} else {
- printf("[+] %s
\n", $url);
+ printf("[+] %s
\n", $url);
}
}
}
diff --git a/inc/html.inc.php b/inc/html.inc.php
index 0a5b342..99ecef2 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -15,12 +15,21 @@ function html_start() {
+
+
+
+
EOT;
}
function html_end() {
echo <<
+