aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--detail.php4
-rw-r--r--host.php5
-rw-r--r--inc/html.inc.php9
-rw-r--r--index.php6
-rw-r--r--layout/style.css20
-rw-r--r--rrd.php4
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);
23 23
24html_start(); 24html_start();
25 25
26printf('<h2>%s</h2>'."\n", $host); 26printf('<fieldset id="%s">', $host);
27printf('<legend>%s</legend>', $host);
27 28
28$plugins = collectd_plugins($host); 29$plugins = collectd_plugins($host);
29 30
@@ -54,6 +55,7 @@ if ($CONFIG['graph_type'] == 'canvas') {
54 printf('<img src="%s%s">'."\n", $CONFIG['weburl'], build_url('graph.php', $_GET)); 55 printf('<img src="%s%s">'."\n", $CONFIG['weburl'], build_url('graph.php', $_GET));
55} 56}
56echo '</div>'; 57echo '</div>';
58echo "</fieldset>\n";
57 59
58html_end(); 60html_end();
59 61
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);
11 11
12html_start(); 12html_start();
13 13
14printf('<h2>%s</h2>'."\n", $host); 14printf("<fieldset id=\"%s\"/>", $host);
15printf("<legend>%s</legend>", $host);
16
15 17
16$plugins = collectd_plugins($host); 18$plugins = collectd_plugins($host);
17 19
@@ -30,6 +32,7 @@ foreach ($selected_plugins as $selected_plugin) {
30 } 32 }
31} 33}
32echo '</div>'; 34echo '</div>';
35printf("</fieldset>");
33 36
34html_end(); 37html_end();
35 38
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;
91function plugin_header($host, $plugin) { 91function plugin_header($host, $plugin) {
92 global $CONFIG; 92 global $CONFIG;
93 93
94 return printf("<h3><a href='%shost.php?h=%s&p=%s'>%s</a></h3>\n", $CONFIG['weburl'], $host, $plugin, $plugin); 94 return printf("<h2><a href='%shost.php?h=%s&p=%s'>%s</a></h2>\n", $CONFIG['weburl'], $host, $plugin, $plugin);
95} 95}
96 96
97function plugins_list($host, $selected_plugins = array()) { 97function plugins_list($host, $selected_plugins = array()) {
@@ -100,7 +100,7 @@ function plugins_list($host, $selected_plugins = array()) {
100 $plugins = collectd_plugins($host); 100 $plugins = collectd_plugins($host);
101 101
102 echo '<div class="plugins">'; 102 echo '<div class="plugins">';
103 echo '<h3>Plugins</h3>'; 103 echo '<h2>Plugins</h2>';
104 echo '<ul>'; 104 echo '<ul>';
105 105
106 printf("<li><a %s href='%shost.php?h=%s'>overview</a></li>\n", 106 printf("<li><a %s href='%shost.php?h=%s'>overview</a></li>\n",
@@ -158,11 +158,13 @@ function selected_timerange($value1, $value2) {
158 return ''; 158 return '';
159} 159}
160 160
161function host_summary($hosts) { 161function host_summary($cat, $hosts) {
162 global $CONFIG; 162 global $CONFIG;
163 163
164 $rrd = new RRDTool($CONFIG['rrdtool']); 164 $rrd = new RRDTool($CONFIG['rrdtool']);
165 165
166 printf('<fieldset id="%s">', $cat);
167 printf('<legend>%s</legend>', $cat);
166 echo "<table class=\"summary\">\n"; 168 echo "<table class=\"summary\">\n";
167 169
168 $row_style = array(0 => "even", 1 => "odd"); 170 $row_style = array(0 => "even", 1 => "odd");
@@ -198,6 +200,7 @@ function host_summary($hosts) {
198 } 200 }
199 201
200 echo "</table>\n"; 202 echo "</table>\n";
203 echo "</fieldset>\n";
201} 204}
202 205
203 206
diff --git a/index.php b/index.php
index 18d8313..41e710f 100644
--- a/index.php
+++ b/index.php
@@ -11,8 +11,7 @@ $h = array();
11# show all categorized hosts 11# show all categorized hosts
12if (is_array($CONFIG['cat'])) { 12if (is_array($CONFIG['cat'])) {
13 foreach($CONFIG['cat'] as $cat => $hosts) { 13 foreach($CONFIG['cat'] as $cat => $hosts) {
14 printf("<h2>%s</h2>\n", $cat); 14 host_summary($cat, $hosts);
15 host_summary($hosts);
16 $h = array_merge($h, $hosts); 15 $h = array_merge($h, $hosts);
17 } 16 }
18} 17}
@@ -24,8 +23,7 @@ $uhosts = array_diff($chosts, $h);
24 23
25# show all uncategorized hosts 24# show all uncategorized hosts
26if ($uhosts) { 25if ($uhosts) {
27 echo "<h2>uncategorized</h2>\n"; 26 host_summary('uncategorized', $uhosts);
28 host_summary($uhosts);
29} 27}
30 28
31html_end(); 29html_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 {
30} 30}
31 31
32h2 { 32h2 {
33 font-size: 1.3em; 33 font-size: 1.1em;
34 margin: 1em 0 0 0; 34 font-weight: normal;
35}
36
37h3 {
38 font-size: 1em;
39} 35}
40 36
41a:link, a:visited, a:active { 37a:link, a:visited, a:active {
@@ -130,3 +126,15 @@ hr {
130 display: inline-block; 126 display: inline-block;
131 margin-bottom: 0.3em; 127 margin-bottom: 0.3em;
132} 128}
129
130fieldset {
131 margin-top: 20px;
132 padding: 0;
133 border: 0;
134}
135
136legend {
137 padding: 0;
138 font-size: 1.4em;
139 font-weight: normal;
140}
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'])) {
16 16
17 html_start(); 17 html_start();
18 echo <<<EOT 18 echo <<<EOT
19<h2>Forbidden</h2> 19<fieldset id="forbidden">
20<legend>forbidden</legend>
20<p><a href="{$CONFIG['weburl']}">Return home...</a></p> 21<p><a href="{$CONFIG['weburl']}">Return home...</a></p>
22</fieldset>
21 23
22EOT; 24EOT;
23 html_end(); 25 html_end();