2009-10-16 14:54:50 +00:00
|
|
|
<?php
|
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
use LibreNMS\Config;
|
2009-10-16 14:54:50 +00:00
|
|
|
|
2012-05-25 12:24:34 +00:00
|
|
|
// FIXME functions!
|
2015-07-13 20:10:26 +02:00
|
|
|
if (!$graph_type) {
|
|
|
|
|
$graph_type = 'pagp_bits';
|
|
|
|
|
}
|
2011-09-18 13:11:04 +00:00
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
$daily_traffic = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.day') . '&to=' . Config::get('time.now') . '&width=215&height=100';
|
|
|
|
|
$daily_url = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.day') . '&to=' . Config::get('time.now') . '&width=500&height=150';
|
2009-10-16 14:54:50 +00:00
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
$weekly_traffic = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.week') . '&to=' . Config::get('time.now') . '&width=215&height=100';
|
|
|
|
|
$weekly_url = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.week') . '&to=' . Config::get('time.now') . '&width=500&height=150';
|
2009-10-16 14:54:50 +00:00
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
$monthly_traffic = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.month') . '&to=' . Config::get('time.now') . '&width=215&height=100';
|
|
|
|
|
$monthly_url = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.month') . '&to=' . Config::get('time.now') . '&width=500&height=150';
|
2009-10-16 14:54:50 +00:00
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
$yearly_traffic = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.year') . '&to=' . Config::get('time.now') . '&width=215&height=100';
|
|
|
|
|
$yearly_url = 'graph.php?port=' . $port['port_id'] . "&type=$graph_type&from=" . Config::get('time.year') . '&to=' . Config::get('time.now') . '&width=500&height=150';
|
2009-10-16 14:54:50 +00:00
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT" . Config::get('overlib_defaults') . ");\" onmouseout=\"return nd();\">
|
2015-07-13 20:10:26 +02:00
|
|
|
<img src='$daily_traffic' border=0></a> ";
|
2019-06-23 00:29:12 -05:00
|
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT" . Config::get('overlib_defaults') . ");\" onmouseout=\"return nd();\">
|
2015-07-13 20:10:26 +02:00
|
|
|
<img src='$weekly_traffic' border=0></a> ";
|
2019-06-23 00:29:12 -05:00
|
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT" . Config::get('overlib_defaults') . ", WIDTH, 350);\" onmouseout=\"return nd();\">
|
2015-07-13 20:10:26 +02:00
|
|
|
<img src='$monthly_traffic' border=0></a> ";
|
2019-06-23 00:29:12 -05:00
|
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT" . Config::get('overlib_defaults') . ", WIDTH, 350);\" onmouseout=\"return nd();\">
|
2015-07-13 20:10:26 +02:00
|
|
|
<img src='$yearly_traffic' border=0></a>";
|
2009-10-16 14:54:50 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
foreach (dbFetchRows('SELECT * FROM `ports` WHERE `pagpGroupIfIndex` = ? and `device_id` = ?', array($port['ifIndex'], $device['device_id'])) as $member) {
|
2017-04-04 08:08:23 +01:00
|
|
|
$member = cleanPort($member);
|
2017-01-21 13:24:05 +02:00
|
|
|
echo "$br<i class='fa fa-anchor fa-lg icon-theme' aria-hidden='true'></i> <strong>".generate_port_link($member).' (PAgP)</strong>';
|
2015-07-13 20:10:26 +02:00
|
|
|
$br = '<br />';
|
2011-03-16 23:10:10 +00:00
|
|
|
}
|