mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Make top 10 box actually useful:
- Fix overlib popup when host metadata contains quotes - Only show ports with traffic - Add host & port links, and port graph
This commit is contained in:
@@ -20,6 +20,8 @@ $query = "
|
||||
FROM ports as p, devices as d
|
||||
WHERE d.device_id = p.device_id
|
||||
AND unix_timestamp() - p.poll_time < $seconds
|
||||
AND ( p.ifInOctets_rate > 0
|
||||
OR p.ifOutOctets_rate > 0 )
|
||||
ORDER BY total desc
|
||||
LIMIT $top
|
||||
";
|
||||
@@ -27,7 +29,7 @@ $query = "
|
||||
echo("<strong>Top $top ports (last $minutes minutes)</strong>");
|
||||
echo('<table class="simple">');
|
||||
foreach (dbFetchRows($query) as $result) {
|
||||
echo('<tr><td>'.$result['hostname'].'</td><td>'.$result['ifIndex'].'</td><td>'.$result['ifDescr'].'</td><td>'.$result['total'].'</td></tr>');
|
||||
echo('<tr><td>'.generate_device_link($result).'</td><td>'.generate_port_link($result).'</td><td>'.generate_port_link($result, generate_port_thumbnail($result)).'</td></tr>');
|
||||
}
|
||||
echo('</table>');
|
||||
|
||||
|
Reference in New Issue
Block a user