From ab23cbe144417f2912f37c68172f56d2bbfb3245 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Tue, 26 Nov 2013 15:32:53 +1000 Subject: [PATCH] Tidy top 10 displays --- html/css/styles.css | 39 +++++++++++++-------- html/includes/front/top_device_bits.inc.php | 8 ++--- html/includes/front/top_ports.inc.php | 9 ++--- html/includes/functions.inc.php | 4 +-- 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/html/css/styles.css b/html/css/styles.css index 6e72a0cb1..4bd912d5b 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -499,11 +499,33 @@ a.list-device-disabled, a.list-device-disabled:visited { } .boxes { - width: 350px; - height: 200px; vertical-align: center; } +.box { + width: 350px; + height: 300px; + padding: 0px; + vertical-align: center; +} + +.top10 { + padding: 0px; + margin: 0px; +} + +.welcome { + padding-right: 25px; +} + +table.simple { + border: 0px; + padding: 0px; + margin: 0px; + width: 100%; + text-align: left; +} + .left-2-col-fluid { display: table-cell; margin-right: 400px; @@ -1560,16 +1582,3 @@ tr.search:nth-child(odd) { margin: 2px; } -.box { -} - -.welcome { - padding-right: 25px; -} - -.simple { - border: 0px; - width: 100%; - text-align: left; -} - diff --git a/html/includes/front/top_device_bits.inc.php b/html/includes/front/top_device_bits.inc.php index bdf9dbcb1..351f0ba43 100644 --- a/html/includes/front/top_device_bits.inc.php +++ b/html/includes/front/top_device_bits.inc.php @@ -31,10 +31,10 @@ $query = " echo("Top $top devices (last $minutes minutes)\n"); echo("\n"); foreach (dbFetchRows($query) as $result) { - echo("". - "". - "". + echo("". + "". + "". "\n"); } echo("
".generate_device_link($result, shorthost($result['hostname']))."".generate_device_link($result, - generate_minigraph_image($result, $config['time']['day'], $config['time']['now'], "device_bits", "no", 150, 21, '&'), array(), 0, 0, 0)."
".generate_device_link($result, shorthost($result['hostname']))."".generate_device_link($result, + generate_minigraph_image($result, $config['time']['day'], $config['time']['now'], "device_bits", "no", 150, 21, '&', "top10"), array(), 0, 0, 0)."
\n"); diff --git a/html/includes/front/top_ports.inc.php b/html/includes/front/top_ports.inc.php index a2015327a..a20795163 100644 --- a/html/includes/front/top_ports.inc.php +++ b/html/includes/front/top_ports.inc.php @@ -29,10 +29,11 @@ $query = " echo("Top $top ports (last $minutes minutes)\n"); echo("\n"); foreach (dbFetchRows($query) as $result) { - echo("\n"); + echo("". + "". + "". + "". + "\n"); } echo("
". - generate_device_link($result, shorthost($result['hostname'])). - "".generate_port_link($result). - "".generate_port_link($result, generate_port_thumbnail($result))."
".generate_device_link($result, shorthost($result['hostname']))."".generate_port_link($result)."".generate_port_link($result, generate_port_thumbnail($result))."
\n"); diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index cd1d95fd3..20f94d35a 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -113,9 +113,9 @@ function get_percentage_colours($percentage) } -function generate_minigraph_image($device, $start, $end, $type, $legend = 'no', $width = 275, $height = 100, $sep = '&') +function generate_minigraph_image($device, $start, $end, $type, $legend = 'no', $width = 275, $height = 100, $sep = '&', $class = "minigraph-image") { - return ''; }