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

BIN
html/images/lolsq.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 KiB

View File

@ -9,7 +9,12 @@ $if_id = $interface['interface_id'];
$interface = ifLabel($interface); $interface = ifLabel($interface);
if($int_colour)
{
$row_colour = $int_colour;
} else {
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
}
$port_adsl_query = mysql_query("SELECT * FROM `ports_adsl` WHERE `interface_id` = '".$interface['interface_id']."'"); $port_adsl_query = mysql_query("SELECT * FROM `ports_adsl` WHERE `interface_id` = '".$interface['interface_id']."'");
$port_adsl = mysql_fetch_assoc($port_adsl_query); $port_adsl = mysql_fetch_assoc($port_adsl_query);

View File

@ -38,7 +38,7 @@ foreach ($datas as $type)
echo('<span class="pagemenu-selected">'); echo('<span class="pagemenu-selected">');
} }
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/routing/" . $type . ($_GET['optb'] ? "/" . $_GET['optb'] : ''). "/'> " . $type_text[$type] ." (".$device_routing_count[$type].")</a>"); echo("<a href='".$config['base_url']."/device/".$device['device_id']."/routing/" . $type . "/'> " . $type_text[$type] ." (".$device_routing_count[$type].")</a>");
if ($_GET['opta'] == $type) { echo("</span>"); } if ($_GET['opta'] == $type) { echo("</span>"); }
$sep = " | "; $sep = " | ";
} }

View File

@ -144,7 +144,8 @@ while ($peer = mysql_fetch_assoc($peer_query))
<td>" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "<br /> <td>" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "<br />
Updates <img src='images/16/arrow_down.png' align=absmiddle> " . $peer['bgpPeerInUpdates'] . " Updates <img src='images/16/arrow_down.png' align=absmiddle> " . $peer['bgpPeerInUpdates'] . "
<img src='images/16/arrow_up.png' align=absmiddle> " . $peer['bgpPeerOutUpdates'] . "</td> <img src='images/16/arrow_up.png' align=absmiddle> " . $peer['bgpPeerOutUpdates'] . "</td>
</tr>"); </tr>
<tr height=5></tr>");
unset($invalid); unset($invalid);

View File

@ -31,7 +31,7 @@ foreach ($datas as $type)
echo('<span class="pagemenu-selected">'); echo('<span class="pagemenu-selected">');
} }
echo("<a href='routing/" . $type . ($_GET['optb'] ? "/" . $_GET['optb'] : ''). "/'> " . $type_text[$type] ." (".$routing_count[$type].")</a>"); echo("<a href='routing/" . $type . "/'> " . $type_text[$type] ." (".$routing_count[$type].")</a>");
if ($_GET['opta'] == $type) { echo("</span>"); } if ($_GET['opta'] == $type) { echo("</span>"); }
$sep = " | "; $sep = " | ";
} }

View File

@ -124,13 +124,13 @@ else
// display overlib graphs // display overlib graphs
$graph_type = "bgp_prefixes"; $graph_type = "bgp_updates";
$local_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150&&afi=ipv4&safi=unicast"; $local_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150&&afi=ipv4&safi=unicast";
$localaddresslink = "<span class=list-large><a href='device/" . $peer['device_id'] . "/routing/bgp/prefixes/ipv4.unicast/' onmouseover=\"return overlib('<img src=\'$local_daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpLocalAddr'] . "</a></span>"; $localaddresslink = "<span class=list-large><a href='device/" . $peer['device_id'] . "/routing/bgp/' onmouseover=\"return overlib('<img src=\'$local_daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpLocalAddr'] . "</a></span>";
$graph_type = "bgp_updates"; $graph_type = "bgp_updates";
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150"; $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&amp;type=" . $graph_type . "&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150";
$peeraddresslink = "<span class=list-large><a href='device/" . $peer['device_id'] . "/routing/bgp/updates/' onmouseover=\"return overlib('<img src=\'$peer_daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . "</a></span>"; $peeraddresslink = "<span class=list-large><a href='device/" . $peer['device_id'] . "/routing/bgp/' onmouseover=\"return overlib('<img src=\'$peer_daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . "</a></span>";
echo('<tr bgcolor="'.$bg_colour.'"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') . ($peer['disabled'] ? ' bordercolor="#cccccc"' : '') . ">"); echo('<tr bgcolor="'.$bg_colour.'"' . ($peer['alert'] ? ' bordercolor="#cc0000"' : '') . ($peer['disabled'] ? ' bordercolor="#cccccc"' : '') . ">");
@ -152,7 +152,7 @@ else
echo(" <td></td> echo(" <td></td>
<td width=150>" . $localaddresslink . "<br />".generate_device_link($peer, shorthost($peer['hostname']), 'routing/bgp/')."</td> <td width=150>" . $localaddresslink . "<br />".generate_device_link($peer, shorthost($peer['hostname']), 'routing/bgp/')."</td>
<td width=30>-></td> <td width=30><b>&#187;</b></td>
<td width=150>" . $peeraddresslink . "</td> <td width=150>" . $peeraddresslink . "</td>
<td width=50><b>$peer_type</b></td> <td width=50><b>$peer_type</b></td>
<td width=50>".$peer['afi']."</td> <td width=50>".$peer['afi']."</td>
@ -160,7 +160,8 @@ else
<td><strong><span style='color: $admin_col;'>" . $peer['bgpPeerAdminStatus'] . "</span><br /><span style='color: $col;'>" . $peer['bgpPeerState'] . "</span></strong></td> <td><strong><span style='color: $admin_col;'>" . $peer['bgpPeerAdminStatus'] . "</span><br /><span style='color: $col;'>" . $peer['bgpPeerState'] . "</span></strong></td>
<td>" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "<br /> <td>" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "<br />
Updates <img src='images/16/arrow_down.png' align=absmiddle /> " . format_si($peer['bgpPeerInUpdates']) . " Updates <img src='images/16/arrow_down.png' align=absmiddle /> " . format_si($peer['bgpPeerInUpdates']) . "
<img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr>"); <img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr>
<tr height=5></tr>");
unset($invalid); unset($invalid);

View File

@ -1,8 +1 @@
<br /> <div style="background-image: url(images/lolsq.gif); width: 100%; min-height: 1200px;">&nbsp;</div>
<br />
<center><h1>Work in Progress</h1>
<br />
<img src="images/consdog.jpg">
<br />
<br />
<b>This page is still under construction</b><br />If you have any ideas for what could go here, or how we could lay out the content that should be here, please share!</center>

View File

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