From e133f9ef74673615bec35cacbd6630cb90ed124f Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 16 May 2015 13:31:01 +0200 Subject: replace table on overview page by divs This works better in a responsive design. --- inc/html.inc.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'inc/html.inc.php') diff --git a/inc/html.inc.php b/inc/html.inc.php index 58813ea..e52d90c 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php @@ -20,7 +20,7 @@ function html_start() { CGP{$path} - + EOT; if (isset($CONFIG['page_refresh']) && is_numeric($CONFIG['page_refresh'])) { @@ -221,7 +221,7 @@ function host_summary($cat, $hosts) { printf('
', htmlentities($cat)); printf('%s', htmlentities($cat)); - echo "\n"; + echo "
\n"; $row_style = array(0 => "even", 1 => "odd"); $host_counter = 0; @@ -229,8 +229,8 @@ function host_summary($cat, $hosts) { foreach($hosts as $host) { $host_counter++; - printf('
', $row_style[$host_counter % 2]); - printf('', + printf('
', $row_style[$host_counter % 2]); + printf('', htmlentities($CONFIG['weburl']), urlencode($host), htmlentities($host)); @@ -253,11 +253,11 @@ function host_summary($cat, $hosts) { foreach (array('ds[shortterm].last_ds', 'ds[midterm].last_ds', 'ds[longterm].last_ds') as $info) { $class = ''; if ($cores > 0 && $rrd_info[$info] > $cores * 2) - $class = ' class="crit"'; + $class = ' crit'; elseif ($cores > 0 && $rrd_info[$info] > $cores) - $class = ' class="warn"'; + $class = ' warn'; - printf('%.2f', $class, $rrd_info[$info]); + printf('
%.2f
', $class, $rrd_info[$info]); } } } @@ -276,11 +276,11 @@ function host_summary($cat, $hosts) { $class = ''; if ($percent_mem > 90) - $class = ' class="crit"'; + $class = ' crit'; elseif ($percent_mem > 70) - $class = ' class="warn"'; + $class = ' warn'; - printf('%d%%', $class, $percent_mem); + printf('
%d%%
', $class, $percent_mem); } } } @@ -296,15 +296,15 @@ function host_summary($cat, $hosts) { elseif ($time > 60) $class .= ' warn'; - printf('
', + printf('
', $class, date('c', $rrd_info['last_update']), $time); } } - print "\n"; + print "\n"; } - echo "
%s
\n"; + echo "\n"; echo "
\n"; } -- cgit v1.1