only show ospf when ospf exists on that host

git-svn-id: http://www.observium.org/svn/observer/trunk@2575 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-26 13:38:15 +00:00
parent ef168cd96b
commit bfd55da261

View File

@ -119,7 +119,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
$device_routing_count['bgp'] = dbFetchCell("SELECT COUNT(*) FROM `bgpPeers` WHERE `device_id` = ?", array($device['device_id']));
if ($device_routing_count['bgp']) { $routing_tabs[] = 'bgp'; }
$device_routing_count['ospf'] = dbFetchCell("SELECT COUNT(*) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'");
$device_routing_count['ospf'] = dbFetchCell("SELECT COUNT(*) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled' AND `device_id` = ?", array($device['device_id']));
if ($device_routing_count['ospf']) { $routing_tabs[] = 'ospf'; }
$device_routing_count['cef'] = dbFetchCell("SELECT COUNT(*) FROM `cef_switching` WHERE `device_id` = ?", array($device['device_id']));