diff options
-rw-r--r-- | detail.php | 2 | ||||
-rw-r--r-- | host.php | 8 | ||||
-rw-r--r-- | inc/html.inc.php | 9 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | layout/style.css | 28 |
5 files changed, 43 insertions, 8 deletions
@@ -15,7 +15,7 @@ $seconds = $_GET['s']; | |||
15 | 15 | ||
16 | html_start(); | 16 | html_start(); |
17 | 17 | ||
18 | printf('<h1><a href="%s">«</a> %s</h1>'."\n", | 18 | printf('<h2><a href="%s">«</a> %s</h2>'."\n", |
19 | $CONFIG['weburl'].'/host.php?h='.htmlentities($host), $host | 19 | $CONFIG['weburl'].'/host.php?h='.htmlentities($host), $host |
20 | ); | 20 | ); |
21 | 21 | ||
@@ -9,7 +9,7 @@ $splugin = $_GET['p']; | |||
9 | 9 | ||
10 | html_start(); | 10 | html_start(); |
11 | 11 | ||
12 | printf('<h1><a href="%s">«</a> %s</h1>'."\n", $CONFIG['weburl'], $host); | 12 | printf('<h2><a href="%s">«</a> %s</h2>'."\n", $CONFIG['weburl'], $host); |
13 | 13 | ||
14 | $plugins = collectd_plugins($host); | 14 | $plugins = collectd_plugins($host); |
15 | 15 | ||
@@ -21,7 +21,7 @@ if(!$plugins) { | |||
21 | # first the ones defined in overview | 21 | # first the ones defined in overview |
22 | foreach($CONFIG['overview'] as $plugin) { | 22 | foreach($CONFIG['overview'] as $plugin) { |
23 | if (in_array($plugin, $plugins)) { | 23 | if (in_array($plugin, $plugins)) { |
24 | printf("<h2>[-] %s</h2>\n", $plugin); | 24 | printf("<h3>[-] %s</h3>\n", $plugin); |
25 | graphs_from_plugin($host, $plugin); | 25 | graphs_from_plugin($host, $plugin); |
26 | } | 26 | } |
27 | } | 27 | } |
@@ -31,10 +31,10 @@ foreach($plugins as $plugin) { | |||
31 | if (!in_array($plugin, $CONFIG['overview'])) { | 31 | if (!in_array($plugin, $CONFIG['overview'])) { |
32 | $url = sprintf('<a href="%s/host.php?h=%s&p=%s">%s</a>'."\n", $CONFIG['weburl'], $host, $plugin, $plugin); | 32 | $url = sprintf('<a href="%s/host.php?h=%s&p=%s">%s</a>'."\n", $CONFIG['weburl'], $host, $plugin, $plugin); |
33 | if ($splugin == $plugin) { | 33 | if ($splugin == $plugin) { |
34 | printf("<h2>[-] %s</h2>\n", $url); | 34 | printf("<h3>[-] %s</h3>\n", $url); |
35 | graphs_from_plugin($host, $plugin); | 35 | graphs_from_plugin($host, $plugin); |
36 | } else { | 36 | } else { |
37 | printf("<h2>[+] %s</h2>\n", $url); | 37 | printf("<h3>[+] %s</h3>\n", $url); |
38 | } | 38 | } |
39 | } | 39 | } |
40 | } | 40 | } |
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() { | |||
15 | </head> | 15 | </head> |
16 | <body> | 16 | <body> |
17 | 17 | ||
18 | <div id="header"> | ||
19 | <h1><a href="{$CONFIG['weburl']}">Collectd Graph Panel</a></h1> | ||
20 | </div> | ||
21 | |||
22 | <div id="content"> | ||
23 | |||
18 | EOT; | 24 | EOT; |
19 | } | 25 | } |
20 | 26 | ||
21 | function html_end() { | 27 | function html_end() { |
22 | echo <<<EOT | 28 | echo <<<EOT |
29 | </div> | ||
30 | <div id="footer"> | ||
23 | <hr><span class="small">Collectd Graph Panel is distributed under the GNU General Public License (GPL)</span> | 31 | <hr><span class="small">Collectd Graph Panel is distributed under the GNU General Public License (GPL)</span> |
32 | </div> | ||
24 | </body> | 33 | </body> |
25 | </html> | 34 | </html> |
26 | EOT; | 35 | EOT; |
@@ -10,7 +10,7 @@ $h = array(); | |||
10 | 10 | ||
11 | # show all categorized hosts | 11 | # show all categorized hosts |
12 | foreach($CONFIG['cat'] as $cat => $hosts) { | 12 | foreach($CONFIG['cat'] as $cat => $hosts) { |
13 | printf("<h1>%s</h1>\n", $cat); | 13 | printf("<h2>%s</h2>\n", $cat); |
14 | host_summary($hosts); | 14 | host_summary($hosts); |
15 | $h = array_merge($h, $hosts); | 15 | $h = array_merge($h, $hosts); |
16 | } | 16 | } |
@@ -21,7 +21,7 @@ $uhosts = array_diff($chosts, $h); | |||
21 | 21 | ||
22 | # show all uncategorized hosts | 22 | # show all uncategorized hosts |
23 | if ($uhosts) { | 23 | if ($uhosts) { |
24 | echo "<h1>uncategorized</h1>\n"; | 24 | echo "<h2>uncategorized</h2>\n"; |
25 | host_summary($uhosts); | 25 | host_summary($uhosts); |
26 | } | 26 | } |
27 | 27 | ||
diff --git a/layout/style.css b/layout/style.css index 08b6757..787069b 100644 --- a/layout/style.css +++ b/layout/style.css | |||
@@ -1,9 +1,35 @@ | |||
1 | body { | ||
2 | font-family: sans-serif; | ||
3 | margin: 0px; | ||
4 | } | ||
5 | |||
6 | #header { | ||
7 | background: #4d79b5; | ||
8 | padding-left: 10px; | ||
9 | } | ||
10 | |||
11 | #header a{ | ||
12 | display: block; | ||
13 | padding: 8px; | ||
14 | color: #fff; | ||
15 | text-decoration: none; | ||
16 | } | ||
17 | |||
18 | #content, #footer{ | ||
19 | padding: 0px 20px 16px; | ||
20 | } | ||
21 | |||
1 | h1 { | 22 | h1 { |
23 | margin-top: 0; | ||
24 | font-size: 1em; | ||
25 | } | ||
26 | |||
27 | h2 { | ||
2 | font-size: 1.5em; | 28 | font-size: 1.5em; |
3 | margin: 0.5em 0; | 29 | margin: 0.5em 0; |
4 | } | 30 | } |
5 | 31 | ||
6 | h2 { | 32 | h3 { |
7 | font-size: 1em; | 33 | font-size: 1em; |
8 | } | 34 | } |
9 | 35 | ||