mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
36 lines
2.7 KiB
PHP
36 lines
2.7 KiB
PHP
<?php
|
|
|
|
use LibreNMS\Config;
|
|
|
|
// FIXME functions!
|
|
if (!$graph_type) {
|
|
$graph_type = 'pagp_bits';
|
|
}
|
|
|
|
$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';
|
|
|
|
$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';
|
|
|
|
$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';
|
|
|
|
$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';
|
|
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT" . Config::get('overlib_defaults') . ");\" onmouseout=\"return nd();\">
|
|
<img src='$daily_traffic' border=0></a> ";
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT" . Config::get('overlib_defaults') . ");\" onmouseout=\"return nd();\">
|
|
<img src='$weekly_traffic' border=0></a> ";
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT" . Config::get('overlib_defaults') . ", WIDTH, 350);\" onmouseout=\"return nd();\">
|
|
<img src='$monthly_traffic' border=0></a> ";
|
|
echo "<a href='#' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT" . Config::get('overlib_defaults') . ", WIDTH, 350);\" onmouseout=\"return nd();\">
|
|
<img src='$yearly_traffic' border=0></a>";
|
|
|
|
foreach (dbFetchRows('SELECT * FROM `ports` WHERE `pagpGroupIfIndex` = ? and `device_id` = ?', array($port['ifIndex'], $device['device_id'])) as $member) {
|
|
$member = cleanPort($member);
|
|
echo "$br<i class='fa fa-anchor fa-lg icon-theme' aria-hidden='true'></i> <strong>".generate_port_link($member).' (PAgP)</strong>';
|
|
$br = '<br />';
|
|
}
|