mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
fixes to many little things. collection of ospf neighbours (but we can't definitely work out what interface they're on, fucking mib is lame!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2210 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -17,7 +17,7 @@ if (is_numeric($id))
|
||||
$device = device_by_id_cache($port['device_id']);
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: Port ".generate_port_link($port);
|
||||
$title .= " :: " . $acc['mac'];
|
||||
$title .= " :: " . formatMac($acc['mac']);
|
||||
$auth = TRUE;
|
||||
|
||||
}
|
||||
|
||||
@@ -272,6 +272,19 @@ foreach (array_keys($menu_sensors) as $item)
|
||||
<!-- <li><a class="menu2four" href="inventory/"><img src="images/16/bricks.png" border="0" align="absmiddle" /> Inventory</a></li> -->
|
||||
|
||||
<?php
|
||||
|
||||
$routing_count['bgp'] = mysql_result(mysql_query("SELECT COUNT(*) from `bgpPeers`"), 0);
|
||||
if ($routing_count['bgp']) { $datas[] = 'bgp'; }
|
||||
|
||||
$routing_count['ospf'] = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'"), 0);
|
||||
if ($routing_count['ospf']) { $datas[] = 'ospf'; }
|
||||
|
||||
$routing_count['cef'] = mysql_result(mysql_query("SELECT COUNT(*) from `cef_switching`"), 0);
|
||||
if ($routing_count['cef']) { $datas[] = 'cef'; }
|
||||
|
||||
$routing_count['vrf'] = @mysql_result(mysql_query("SELECT COUNT(*) from `vrfs`"), 0);
|
||||
if($routing_count['vrf']) { $datas[] = 'vrf'; }
|
||||
|
||||
if ($_SESSION['userlevel'] >= '5')
|
||||
{
|
||||
echo('
|
||||
@@ -279,10 +292,19 @@ if ($_SESSION['userlevel'] >= '5')
|
||||
<table><tr><td>
|
||||
<ul>');
|
||||
|
||||
if ($config['enable_vrfs']) { echo('<li><a href="routing/vrf/"><img src="images/16/layers.png" border="0" align="absmiddle" /> VRFs</a></li> <li><hr width=140></li> '); }
|
||||
if ($_SESSION['userlevel'] >= '5' && $routing_count['vrf']) { echo('<li><a href="routing/vrf/"><img src="images/16/layers.png" border="0" align="absmiddle" /> VRFs</a></li> <li><hr width=140></li> '); }
|
||||
|
||||
if ($_SESSION['userlevel'] >= '5' && $routing_count['ospf'])
|
||||
{
|
||||
echo('
|
||||
<li><a href="routing/ospf/all/nographs/"><img src="images/16/text_letter_omega.png" border="0" align="absmiddle" /> OSPF Devices </a></li>
|
||||
<li><hr width=140></li>
|
||||
');
|
||||
}
|
||||
|
||||
|
||||
## BGP Sessions
|
||||
if ($_SESSION['userlevel'] >= '5' && (isset($config['enable_bgp']) && $config['enable_bgp']))
|
||||
if ($_SESSION['userlevel'] >= '5' && $routing_count['bgp'])
|
||||
{
|
||||
echo('
|
||||
<li><a href="routing/bgp/all/nographs/"><img src="images/16/link.png" border="0" align="absmiddle" /> BGP All Sessions </a></li>
|
||||
|
||||
Reference in New Issue
Block a user