mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
only show ADSL/Neighbours on those devices which have entries
git-svn-id: http://www.observium.org/svn/observer/trunk@2170 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -7,11 +7,18 @@ if ($_GET['opta'] == 'graphs')
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
$menu_options = array('basic' => 'Basic',
|
||||
'details' => 'Details',
|
||||
'neighbours' => 'Neighbours',
|
||||
'arp' => 'ARP Table',
|
||||
'adsl' => 'ADSL');
|
||||
$menu_options['basic'] = 'Basic';
|
||||
$menu_options['details'] = 'Details';
|
||||
$menu_options['arp'] = 'ARP Table';
|
||||
|
||||
if(mysql_result(mysql_query("SELECT * FROM links AS L, ports AS I WHERE I.device_id = '".$device['device_id']."' AND I.interface_id = L.local_interface_id"),0))
|
||||
{
|
||||
$menu_options['neighbours'] = 'Neighbours';
|
||||
}
|
||||
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `ifType` = 'adsl'"),0))
|
||||
{
|
||||
$menu_options['adsl'] = 'ADSL';
|
||||
}
|
||||
|
||||
if (!$_GET['opta']) { $_GET['opta'] = "basic"; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user