mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
extend new menu to device/interface (port!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2047 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -48,40 +48,82 @@ if ($pos !== false )
|
||||
$broke = yes;
|
||||
}
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ports` WHERE `pagpGroupIfIndex` = '".$interface['ifIndex']."' and `device_id` = '".$device['device_id']."'"),0))
|
||||
{
|
||||
$pagp = " | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/pagp/'>PAgP</a>";
|
||||
}
|
||||
|
||||
echo("<div style='clear: both;'>");
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/'>Graphs</a> | ");
|
||||
if ($_GET['optb'] == "graphs" || !$_GET['optb']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/'>Graphs</a>");
|
||||
if ($_GET['optb'] == "graphs" || !$_GET['optb']) { echo("</span>"); }
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$interface['interface_id']."'"),0))
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$interface['interface_id']."'"),0) )
|
||||
{
|
||||
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/interface/".$interface['interface_id']."/adsl/'>ADSL</a> | ");
|
||||
echo(" | ");
|
||||
if ($_GET['optb'] == "adsl") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/interface/".$interface['interface_id']."/adsl/'>ADSL</a>");
|
||||
if ($_GET['optb'] == "adsl") { echo("</span>"); }
|
||||
}
|
||||
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/arp/'>ARP Table</a>$pagp");
|
||||
echo(" | ");
|
||||
|
||||
if (mysql_result(mysql_query("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$interface['interface_id']."'"),0) > "0")
|
||||
if ($_GET['optb'] == "arp") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/arp/'>ARP Table</a>");
|
||||
if ($_GET['optb'] == "arp") { echo("</span>"); }
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ports` WHERE `pagpGroupIfIndex` = '".
|
||||
$interface['ifIndex']."' and `device_id` = '".$device['device_id']."'"),0) )
|
||||
{
|
||||
echo(" | Mac Accounting :
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/'>Bits</a>
|
||||
(<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/thumbs/'>Mini</a>|<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/top10/'>Top10</a>) |
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/'>Packets</a>
|
||||
(<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/thumbs/'>Mini</a>)");
|
||||
echo(" | ");
|
||||
if ($_GET['optb'] == "pagp") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/pagp/'>PAgP</a>");
|
||||
if ($_GET['optb'] == "pagp") { echo("</span>"); }
|
||||
}
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM juniAtmVp WHERE interface_id = '".$interface['interface_id']."'"),0) > "0")
|
||||
|
||||
if (mysql_result(mysql_query("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$interface['interface_id']."'"),0) > "0" )
|
||||
{
|
||||
echo(" | ATM VPs :");
|
||||
echo(" <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/bits/'>Bits</a>");
|
||||
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/packets/'>Packets</a>");
|
||||
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/cells/'>Cells</a>");
|
||||
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/errors/'>Errors</a>");
|
||||
echo(" | Mac Accounting : ");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "bits" && !$_GET['optd']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/'>Bits</a>");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "bits" && !$_GET['optd']) { echo("</span>"); }
|
||||
echo("(");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "bits" && $_GET['optd'] == "thumbs") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/thumbs/'>Mini</a>");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "bits" && $_GET['optd'] == "thumbs") { echo("</span>"); }
|
||||
echo('|');
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "bits" && $_GET['optd'] == "top10") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/top10/'>Top10</a>)");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "bits" && $_GET['optd'] == "top10") { echo("</span>"); }
|
||||
echo(" | ");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "pkts" && !$_GET['optd']) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/'>Packets</a>");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "pkts" && !$_GET['optd']) { echo("</span>"); }
|
||||
echo("(");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "pkts" && $_GET['optd'] == "thumbs") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/thumbs/'>Mini</a>");
|
||||
if ($_GET['optb'] == "macaccounting" && $_GET['optc'] == "pkts" && $_GET['optd'] == "thumbs") { echo("</span>"); }
|
||||
echo(")");
|
||||
}
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM juniAtmVp WHERE interface_id = '".$interface['interface_id']."'"),0) > "0" )
|
||||
{
|
||||
echo(" | ATM VPs : ");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "bits") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/bits/'>Bits</a>");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "bits") { echo("</span>"); }
|
||||
echo(" | ");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "packets") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/packets/'>Packets</a>");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "bits") { echo("</span>"); }
|
||||
echo(" | ");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "cells") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/cells/'>Cells</a>");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "bits") { echo("</span>"); }
|
||||
echo(" | ");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "errors") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/junose-atm-vp/errors/'>Errors</a>");
|
||||
if ($_GET['optb'] == "junose-atm-vp" && $_GET['optc'] == "bits") { echo("</span>"); }
|
||||
}
|
||||
|
||||
print_optionbar_end();
|
||||
@ -90,4 +132,4 @@ echo("<div style='margin: 5px;'>");
|
||||
include("pages/device/port/".mres($_GET['optb']).".inc.php");
|
||||
echo("</div>");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user