mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Tidy top 10 displays
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -31,10 +31,10 @@ $query = "
|
||||
echo("<strong>Top $top devices (last $minutes minutes)</strong>\n");
|
||||
echo("<table class='simple'>\n");
|
||||
foreach (dbFetchRows($query) as $result) {
|
||||
echo("<tr>".
|
||||
"<td>".generate_device_link($result, shorthost($result['hostname']))."</td>".
|
||||
"<td>".generate_device_link($result,
|
||||
generate_minigraph_image($result, $config['time']['day'], $config['time']['now'], "device_bits", "no", 150, 21, '&'), array(), 0, 0, 0)."</td>".
|
||||
echo("<tr class=top10>".
|
||||
"<td class=top10>".generate_device_link($result, shorthost($result['hostname']))."</td>".
|
||||
"<td class=top10>".generate_device_link($result,
|
||||
generate_minigraph_image($result, $config['time']['day'], $config['time']['now'], "device_bits", "no", 150, 21, '&', "top10"), array(), 0, 0, 0)."</td>".
|
||||
"</tr>\n");
|
||||
}
|
||||
echo("</table>\n");
|
||||
|
@@ -29,10 +29,11 @@ $query = "
|
||||
echo("<strong>Top $top ports (last $minutes minutes)</strong>\n");
|
||||
echo("<table class='simple'>\n");
|
||||
foreach (dbFetchRows($query) as $result) {
|
||||
echo("<tr><td>".
|
||||
generate_device_link($result, shorthost($result['hostname'])).
|
||||
"</td><td>".generate_port_link($result).
|
||||
"</td><td>".generate_port_link($result, generate_port_thumbnail($result))."</td></tr>\n");
|
||||
echo("<tr class=top10>".
|
||||
"<td class=top10>".generate_device_link($result, shorthost($result['hostname']))."</td>".
|
||||
"<td class=top10>".generate_port_link($result)."</td>".
|
||||
"<td class=top10>".generate_port_link($result, generate_port_thumbnail($result))."</td>".
|
||||
"</tr>\n");
|
||||
}
|
||||
echo("</table>\n");
|
||||
|
||||
|
@@ -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 '<img class=minigraph-image src="graph.php?'.
|
||||
return '<img class="'.$class.'" src="graph.php?'.
|
||||
implode(array('device='.$device['device_id'], "from=$start", "to=$end", "width=$width", "height=$height", "type=$type", "legend=$legend"), $sep).'">';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user