move vrfs into routing for devices

git-svn-id: http://www.observium.org/svn/observer/trunk@2197 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-28 15:01:36 +00:00
parent bd5d4d0324
commit 0572f4a031
4 changed files with 21 additions and 16 deletions

View File

@@ -4,7 +4,7 @@ if (is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list
echo("<tr bgcolor='$bg_colour'>");
echo("<td width=200 class=list-large><a href='vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a></td>");
echo("<td width=200 class=list-large><a href='routing/vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a></td>");
echo("<td width=150 class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
echo("<td width=100 class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
@@ -12,9 +12,9 @@ echo('<td class="list-bold">');
$ports_query = mysql_query("SELECT * FROM ports WHERE `device_id` = '" . $device['device_id'] . "' AND `ifVrf` = '" . $vrf['vrf_id'] . "' ");
while ($port = mysql_fetch_assoc($ports_query))
{
if ($_GET['opta'] == "graphs")
if ($_GET['optb'] == "graphs")
{
$graph_type = "port_" . $_GET['optb'];
$graph_type = "port_" . $_GET['optc'];
echo("<div style='display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color: #e9e9e9;'>
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>
<a href='device/".$device['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\

View File

@@ -110,14 +110,14 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
</li>');
}
if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
{
echo('<li class="' . $select['vrfs'] . '">
<a href="device/' . $device['device_id'] . '/vrfs/">
<img src="images/16/layers.png" align="absmiddle" border="0" /> VRFs
</a>
</li>');
}
# if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
# {
# echo('<li class="' . $select['vrfs'] . '">
# <a href="device/' . $device['device_id'] . '/vrfs/">
# <img src="images/16/layers.png" align="absmiddle" border="0" /> VRFs
# </a>
# </li>');
# }

View File

@@ -3,6 +3,11 @@
$datas[] = 'overview';
if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
{
$datas[] = 'vrf';
}
$bgp_count = mysql_result(mysql_query("select count(*) from bgpPeers WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($bgp_count) { $datas[] = 'bgp'; }
@@ -12,11 +17,11 @@ if ($cef_count) { $datas[] = 'cef'; }
$ospf_count = mysql_result(mysql_query("select count(*) from ospf_instances WHERE device_id = '" . $device['device_id'] . "'"), 0);
if ($ospf_count) { $datas[] = 'ospf'; }
$type_text['overview'] = "Overview";
$type_text['bgp'] = "BGP";
$type_text['cef'] = "CEF";
$type_text['ospf'] = "OSPF";
$type_text['vrf'] = "VRFs";
print_optionbar_start();

View File

@@ -12,7 +12,7 @@ foreach ($menu_options as $option => $text)
{
echo($sep);
if ($_GET['opta'] == $option) { echo("<span class='pagemenu-selected'>"); }
echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/' . $option . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $text
echo('<a href="device/' . $device['device_id'] . '/routing/vrf/' . $option . ($_GET['optc'] ? '/' . $_GET['optc'] : ''). '/">' . $text
. '</a>');
if ($_GET['opta'] == $option) { echo("</span>"); }
$sep = " | ";
@@ -31,9 +31,9 @@ $graph_types = array("bits" => "Bits",
foreach ($graph_types as $type => $descr)
{
echo("$type_sep");
if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }
echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/graphs/'.$type.'/">'.$descr.'</a>');
if ($_GET['optb'] == $type) { echo("</span>"); }
if ($_GET['optc'] == $type) { echo("<span class='pagemenu-selected'>"); }
echo('<a href="device/' . $device['device_id'] . '/routing/vrf/graphs/'.$type.'/">'.$descr.'</a>');
if ($_GET['optc'] == $type) { echo("</span>"); }
# echo('(');
# if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }