diff options
-rw-r--r-- | detail.php | 4 | ||||
-rw-r--r-- | host.php | 5 | ||||
-rw-r--r-- | inc/html.inc.php | 9 | ||||
-rw-r--r-- | index.php | 6 | ||||
-rw-r--r-- | layout/style.css | 20 | ||||
-rw-r--r-- | rrd.php | 4 |
6 files changed, 32 insertions, 16 deletions
@@ -23,7 +23,8 @@ $selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin); | |||
23 | 23 | ||
24 | html_start(); | 24 | html_start(); |
25 | 25 | ||
26 | printf('<h2>%s</h2>'."\n", $host); | 26 | printf('<fieldset id="%s">', $host); |
27 | printf('<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 | } |
56 | echo '</div>'; | 57 | echo '</div>'; |
58 | echo "</fieldset>\n"; | ||
57 | 59 | ||
58 | html_end(); | 60 | html_end(); |
59 | 61 | ||
@@ -11,7 +11,9 @@ $selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin); | |||
11 | 11 | ||
12 | html_start(); | 12 | html_start(); |
13 | 13 | ||
14 | printf('<h2>%s</h2>'."\n", $host); | 14 | printf("<fieldset id=\"%s\"/>", $host); |
15 | printf("<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 | } |
32 | echo '</div>'; | 34 | echo '</div>'; |
35 | printf("</fieldset>"); | ||
33 | 36 | ||
34 | html_end(); | 37 | html_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; | |||
91 | function plugin_header($host, $plugin) { | 91 | function 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 | ||
97 | function plugins_list($host, $selected_plugins = array()) { | 97 | function 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 | ||
161 | function host_summary($hosts) { | 161 | function 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 | ||
@@ -11,8 +11,7 @@ $h = array(); | |||
11 | # show all categorized hosts | 11 | # show all categorized hosts |
12 | if (is_array($CONFIG['cat'])) { | 12 | if (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 |
26 | if ($uhosts) { | 25 | if ($uhosts) { |
27 | echo "<h2>uncategorized</h2>\n"; | 26 | host_summary('uncategorized', $uhosts); |
28 | host_summary($uhosts); | ||
29 | } | 27 | } |
30 | 28 | ||
31 | html_end(); | 29 | 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 { | |||
30 | } | 30 | } |
31 | 31 | ||
32 | h2 { | 32 | h2 { |
33 | font-size: 1.3em; | 33 | font-size: 1.1em; |
34 | margin: 1em 0 0 0; | 34 | font-weight: normal; |
35 | } | ||
36 | |||
37 | h3 { | ||
38 | font-size: 1em; | ||
39 | } | 35 | } |
40 | 36 | ||
41 | a:link, a:visited, a:active { | 37 | a: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 | |||
130 | fieldset { | ||
131 | margin-top: 20px; | ||
132 | padding: 0; | ||
133 | border: 0; | ||
134 | } | ||
135 | |||
136 | legend { | ||
137 | padding: 0; | ||
138 | font-size: 1.4em; | ||
139 | font-weight: normal; | ||
140 | } | ||
@@ -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 | ||
22 | EOT; | 24 | EOT; |
23 | html_end(); | 25 | html_end(); |