mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@2506 61d68cd4-352d-0410-923a-c4978735b2b8
35 lines
1.7 KiB
PHP
35 lines
1.7 KiB
PHP
<?
|
|
foreach ($ports as $port)
|
|
{
|
|
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
|
|
|
$speed = humanspeed($port['ifSpeed']);
|
|
$type = humanmedia($port['ifType']);
|
|
|
|
$port['in_rate'] = formatRates($port['ifInOctets_rate'] * 8);
|
|
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
|
|
|
|
|
|
if ($port['in_errors'] > 0 || $port['out_errors'] > 0)
|
|
{
|
|
$error_img = generate_port_link($port,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>",errors);
|
|
} else { $error_img = ""; }
|
|
|
|
if (port_permitted($port['interface_id'], $port['device_id']))
|
|
{
|
|
$port = ifLabel($port, $device);
|
|
|
|
$graph_type = "port_" . $subformat;
|
|
|
|
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>
|
|
<a href='device/".$port['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\
|
|
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
|
|
<img src=\'graph.php?type=$graph_type&id=".$port['interface_id']."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=450&height=150&title=yes\'>\
|
|
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
|
|
"<img src='graph.php?type=$graph_type&id=".$port['interface_id']."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=315&height=110&legend=no&title=yes'>
|
|
</a>
|
|
</div>");
|
|
}
|
|
}
|
|
?>
|