fixes and visual representation of CEF switching.

git-svn-id: http://www.observium.org/svn/observer/trunk@2211 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-01 12:37:43 +00:00
parent 8e9f47f2b9
commit dddcf485dc
8 changed files with 25 additions and 25 deletions

View File

@@ -113,7 +113,7 @@ if($_GET['optb'] == "all" ) {
} else {
echo("<div style='background: $list_colour_b; padding: 10px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
echo("<div style='background: $list_colour_a; padding: 10px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
$vrf_query = mysql_query("SELECT * FROM `vrfs` WHERE mplsVpnVrfRouteDistinguisher = '".$_GET['optb']."'");
$vrf = mysql_fetch_assoc($vrf_query);
echo("<tr valign=top bgcolor='$bg_colour'>");
@@ -123,32 +123,32 @@ if($_GET['optb'] == "all" ) {
echo("</table></div>");
$devices = mysql_query("SELECT * FROM `vrfs` AS V, `devices` AS D WHERE `mplsVpnVrfRouteDistinguisher` = '".$vrf['mplsVpnVrfRouteDistinguisher']."' AND D.device_id = V.device_id");
$x=1;
$x=0;
while ($device = mysql_fetch_assoc($devices))
{
$hostname = $device['hostname'];
#if (!is_integer($x/2)) { $device_colour = $list_colour_a; } else { $device_colour = $list_colour_b; }
echo("<table cellpadding=7 cellspacing=0 class=devicetable width=100%>");
if (!is_integer($x/2)) { $device_colour = $list_colour_a; } else { $device_colour = $list_colour_b; }
echo("<table cellpadding=10 cellspacing=0 class=devicetable width=100%>");
include("includes/device-header.inc.php");
echo("</table>");
$ports = mysql_query("SELECT * FROM `ports` WHERE `ifVrf` = '".$device['vrf_id']."' and device_id = '".$device['device_id']."'");
unset($seperator);
echo("<table cellspacing=0 cellpadding=7>");
echo('<div style="margin: 0 0 0 60px;"><table cellspacing=0 cellpadding=7>');
$i=1;
while ($interface = mysql_fetch_assoc($ports))
{
if (!is_integer($x/2))
{
if (is_integer($i/2)) { $int_colour = $list_colour_a_a; } else { $int_colour = $list_colour_a_b; }
if (is_integer($i/2)) { $int_colour = $list_colour_a_b; } else { $int_colour = $list_colour_a_a; }
} else {
if (is_integer($i/2)) { $int_colour = $list_colour_b_b; } else { $int_colour = $list_colour_b_a; }
if (is_integer($i/2)) { $int_colour = $list_colour_b_a; } else { $int_colour = $list_colour_b_b; }
}
include("includes/print-interface.inc.php");
$i++;
}
$x++;
echo("</table>");
echo("</table></div>");
echo("<div style='height: 10px;'></div>");
}