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:
Adam Amstrong
2011-04-30 22:20:11 +00:00
parent 965db1b350
commit 8e9f47f2b9
12 changed files with 146 additions and 31 deletions
+10 -10
View File
@@ -1,19 +1,19 @@
<?php
#$datas[] = 'overview';
unset($datas);
$routing_count['bgp'] = mysql_result(mysql_query("select count(*) from bgpPeers WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($routing_count['bgp']) { $datas[] = 'bgp'; }
$device_routing_count['bgp'] = mysql_result(mysql_query("select count(*) from bgpPeers WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($device_routing_count['bgp']) { $datas[] = 'bgp'; }
$routing_count['ospf'] = mysql_result(mysql_query("select count(*) from ospf_ports WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($routing_count['ospf']) { $datas[] = 'ospf'; }
$device_routing_count['ospf'] = mysql_result(mysql_query("select count(*) from ospf_ports WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($device_routing_count['ospf']) { $datas[] = 'ospf'; }
$routing_count['cef'] = mysql_result(mysql_query("select count(*) from cef_switching WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($routing_count['cef']) { $datas[] = 'cef'; }
$device_routing_count['cef'] = mysql_result(mysql_query("select count(*) from cef_switching WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($device_routing_count['cef']) { $datas[] = 'cef'; }
$routing_count['vrf'] = @mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0);
if($routing_count['vrf']) { $datas[] = 'vrf'; }
$device_routing_count['vrf'] = @mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0);
if($device_routing_count['vrf']) { $datas[] = 'vrf'; }
#$type_text['overview'] = "Overview";
$type_text['bgp'] = "BGP";
@@ -38,7 +38,7 @@ foreach ($datas as $type)
echo('<span class="pagemenu-selected">');
}
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/routing/" . $type . ($_GET['optb'] ? "/" . $_GET['optb'] : ''). "/'> " . $type_text[$type] ." (".$routing_count[$type].")</a>");
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/routing/" . $type . ($_GET['optb'] ? "/" . $_GET['optb'] : ''). "/'> " . $type_text[$type] ." (".$device_routing_count[$type].")</a>");
if ($_GET['opta'] == $type) { echo("</span>"); }
$sep = " | ";
}