From 51cd1c4dbdd684dd9a2d487770b6f28d67a25ccc Mon Sep 17 00:00:00 2001
From: Pim van den Berg
Date: Mon, 20 May 2013 22:51:44 +0200
Subject: start using fieldset + legend for showing data
---
detail.php | 4 +++-
host.php | 5 ++++-
inc/html.inc.php | 9 ++++++---
index.php | 6 ++----
layout/style.css | 20 ++++++++++++++------
rrd.php | 4 +++-
6 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/detail.php b/detail.php
index c7df632..5bf2883 100644
--- a/detail.php
+++ b/detail.php
@@ -23,7 +23,8 @@ $selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin);
html_start();
-printf('
%s
'."\n", $host);
+printf('\n";
html_end();
diff --git a/host.php b/host.php
index 453cfb4..34cc03c 100644
--- a/host.php
+++ b/host.php
@@ -11,7 +11,9 @@ $selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin);
html_start();
-printf('%s
'."\n", $host);
+printf("");
html_end();
diff --git a/inc/html.inc.php b/inc/html.inc.php
index a0e2c8d..0a33da5 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -91,7 +91,7 @@ EOT;
function plugin_header($host, $plugin) {
global $CONFIG;
- return printf("\n", $CONFIG['weburl'], $host, $plugin, $plugin);
+ return printf("\n", $CONFIG['weburl'], $host, $plugin, $plugin);
}
function plugins_list($host, $selected_plugins = array()) {
@@ -100,7 +100,7 @@ function plugins_list($host, $selected_plugins = array()) {
$plugins = collectd_plugins($host);
echo '';
- echo '
Plugins
';
+ echo '
Plugins
';
echo '
';
printf("- overview
\n",
@@ -158,11 +158,13 @@ function selected_timerange($value1, $value2) {
return '';
}
-function host_summary($hosts) {
+function host_summary($cat, $hosts) {
global $CONFIG;
$rrd = new RRDTool($CONFIG['rrdtool']);
+ printf('\n";
}
diff --git a/index.php b/index.php
index 18d8313..41e710f 100644
--- a/index.php
+++ b/index.php
@@ -11,8 +11,7 @@ $h = array();
# show all categorized hosts
if (is_array($CONFIG['cat'])) {
foreach($CONFIG['cat'] as $cat => $hosts) {
- printf("%s
\n", $cat);
- host_summary($hosts);
+ host_summary($cat, $hosts);
$h = array_merge($h, $hosts);
}
}
@@ -24,8 +23,7 @@ $uhosts = array_diff($chosts, $h);
# show all uncategorized hosts
if ($uhosts) {
- echo "uncategorized
\n";
- host_summary($uhosts);
+ host_summary('uncategorized', $uhosts);
}
html_end();
diff --git a/layout/style.css b/layout/style.css
index 56b7644..a828a8d 100644
--- a/layout/style.css
+++ b/layout/style.css
@@ -30,12 +30,8 @@ h1 {
}
h2 {
- font-size: 1.3em;
- margin: 1em 0 0 0;
-}
-
-h3 {
- font-size: 1em;
+ font-size: 1.1em;
+ font-weight: normal;
}
a:link, a:visited, a:active {
@@ -130,3 +126,15 @@ hr {
display: inline-block;
margin-bottom: 0.3em;
}
+
+fieldset {
+ margin-top: 20px;
+ padding: 0;
+ border: 0;
+}
+
+legend {
+ padding: 0;
+ font-size: 1.4em;
+ font-weight: normal;
+}
diff --git a/rrd.php b/rrd.php
index a6f341a..a873bf7 100644
--- a/rrd.php
+++ b/rrd.php
@@ -16,8 +16,10 @@ if ($file = validateRRDPath($CONFIG['datadir'], $_SERVER['PATH_INFO'])) {
html_start();
echo <<Forbidden
+
EOT;
html_end();
--
cgit v1.1