diff --git a/html/includes/print-vrf.inc.php b/html/includes/print-vrf.inc.php
index a92c6ac9a..eb366cfdc 100644
--- a/html/includes/print-vrf.inc.php
+++ b/html/includes/print-vrf.inc.php
@@ -4,7 +4,7 @@ if (is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list
echo("
");
-echo("| " . $vrf['vrf_name'] . " | ");
+echo("" . $vrf['vrf_name'] . " | ");
echo("" . $vrf['mplsVpnVrfDescription'] . " | ");
echo("" . $vrf['mplsVpnVrfRouteDistinguisher'] . " | ");
@@ -12,9 +12,9 @@ echo('');
$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("
".makeshortif($port['ifDescr'])."
');
}
- if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
- {
- echo('
-
- VRFs
-
- ');
- }
+# if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
+# {
+# echo('
+#
+# VRFs
+#
+# ');
+# }
diff --git a/html/pages/device/routing.inc.php b/html/pages/device/routing.inc.php
index fbdd5b66c..1b86de13e 100644
--- a/html/pages/device/routing.inc.php
+++ b/html/pages/device/routing.inc.php
@@ -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();
diff --git a/html/pages/device/vrfs.inc.php b/html/pages/device/routing/vrf.inc.php
similarity index 78%
rename from html/pages/device/vrfs.inc.php
rename to html/pages/device/routing/vrf.inc.php
index 647f6b673..86d5ae12b 100644
--- a/html/pages/device/vrfs.inc.php
+++ b/html/pages/device/routing/vrf.inc.php
@@ -12,7 +12,7 @@ foreach ($menu_options as $option => $text)
{
echo($sep);
if ($_GET['opta'] == $option) { echo(""); }
$sep = " | ";
@@ -31,9 +31,9 @@ $graph_types = array("bits" => "Bits",
foreach ($graph_types as $type => $descr)
{
echo("$type_sep");
- if ($_GET['optb'] == $type) { echo(""); }
+ if ($_GET['optc'] == $type) { echo(""); }
# echo('(');
# if ($_GET['optb'] == $type) { echo(" |