From 5ae22069f4d6470c00ad0db32ab29dbf7cc043c8 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 21 Oct 2009 11:37:03 +0000 Subject: [PATCH] add vrf page git-svn-id: http://www.observium.org/svn/observer/trunk@490 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/vrf.php | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 html/pages/vrf.php diff --git a/html/pages/vrf.php b/html/pages/vrf.php new file mode 100644 index 0000000000..7a3e4117f0 --- /dev/null +++ b/html/pages/vrf.php @@ -0,0 +1,63 @@ + +Basic | +Details | Graphs: +Bits | +Packets | +NU Packets | +Errors + "); + +if($_GET['opta'] == graphs ) { + if($_GET['optb']) { + $graph_type = $_GET['optb']; + } else { + $graph_type = "bits"; + } + $dographs = 1; +} + +if($_GET['opta'] == "details" ) { + $port_details = 1; +} + + echo("
"); + $vrf_query = mysql_query("SELECT * FROM `vrfs` WHERE mplsVpnVrfRouteDistinguisher = '".$_GET['id']."'"); + $vrf = mysql_fetch_array($vrf_query); + echo(""); + echo(""); + echo(""); + echo(""); + echo("
" . $vrf['vrf_name'] . "" . $vrf['mplsVpnVrfRouteDistinguisher'] . "" . $vrf['mplsVpnVrfDescription'] . "
"); + + + $devices = mysql_query("SELECT * FROM `vrfs` AS V, `devices` AS D WHERE `mplsVpnVrfRouteDistinguisher` = '".$vrf['mplsVpnVrfRouteDistinguisher']."' AND D.device_id = V.device_id"); + $x=1; + while($device = mysql_fetch_array($devices)) { + $hostname = $device['hostname']; + #if(!is_integer($x/2)) { $device_colour = $list_colour_a; } else { $device_colour = $list_colour_b; } + echo(""); + include("includes/device-header.inc"); + echo("
"); + $interfaces = mysql_query("SELECT * FROM `interfaces` WHERE `ifVrf` = '".$device['vrf_id']."' and device_id = '".$device['device_id']."'"); + unset($seperator); + echo(""); + $i=1; + while($interface = mysql_fetch_array($interfaces)) { + if(!is_integer($x/2)) { + if(is_integer($i/2)) { $int_colour = $list_colour_a_a; } else { $int_colour = $list_colour_a_b; } + } else { + if(is_integer($i/2)) { $int_colour = $list_colour_b_b; } else { $int_colour = $list_colour_b_a; } + } + include("includes/print-interface.inc"); + $i++; + } + $x++; + echo("
"); + echo("
"); + } + +?> +