UNDER MOTHERFUCKING CONSTRUCTION. because i can't work out what to put there :(

git-svn-id: http://www.observium.org/svn/observer/trunk@2205 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-29 22:46:37 +00:00
parent c7e46edfb8
commit a7cd099b80
4 changed files with 62 additions and 4 deletions

BIN
html/images/consdog.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -4,16 +4,16 @@ if ($_GET['optb'] == "graphs" || $_GET['optc'] == "graphs") { $graphs = "graphs"
#$datas[] = 'overview'; #$datas[] = 'overview';
$routing_count['bgp'] = mysql_result(mysql_query("select count(*) from bgpPeers"), 0); $routing_count['bgp'] = mysql_result(mysql_query("SELECT COUNT(*) from `bgpPeers`"), 0);
if ($routing_count['bgp']) { $datas[] = 'bgp'; } if ($routing_count['bgp']) { $datas[] = 'bgp'; }
$routing_count['ospf'] = mysql_result(mysql_query("select count(*) from ospf_ports"), 0); $routing_count['ospf'] = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'"), 0);
if ($routing_count['ospf']) { $datas[] = 'ospf'; } if ($routing_count['ospf']) { $datas[] = 'ospf'; }
$routing_count['cef'] = mysql_result(mysql_query("select count(*) from cef_switching"), 0); $routing_count['cef'] = mysql_result(mysql_query("SELECT COUNT(*) from `cef_switching`"), 0);
if ($routing_count['cef']) { $datas[] = 'cef'; } if ($routing_count['cef']) { $datas[] = 'cef'; }
$routing_count['vrf'] = @mysql_result(mysql_query("select count(*) from vrfs"), 0); $routing_count['vrf'] = @mysql_result(mysql_query("SELECT COUNT(*) from `vrfs`"), 0);
if($routing_count['vrf']) { $datas[] = 'vrf'; } if($routing_count['vrf']) { $datas[] = 'vrf'; }
#$type_text['overview'] = "Overview"; #$type_text['overview'] = "Overview";

View File

@ -0,0 +1,8 @@
<br />
<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

@ -0,0 +1,50 @@
<?php
$sql = "SELECT * FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'";
$query = mysql_query($sql);
$i_i = "0";
echo('<table width=100% border=0 cellpadding=10>');
echo('<tr><th>Device</th><th>Router Id</th><th>Status</th><th>ABR</th><th>ASBR</th><th>Areas</th><th>Ports</th><th>Neighbours</th></tr>');
#### Loop Instances
while($instance = mysql_fetch_assoc($query))
{
if (!is_integer($i_i/2)) { $instance_bg = $list_colour_a; } else { $instance_bg = $list_colour_b; }
$device = device_by_id_cache($instance['device_id']);
$area_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_areas` WHERE `device_id` = '".$device['device_id']."'"),0);
$port_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_ports` WHERE `device_id` = '".$device['device_id']."'"),0);
$port_count_enabled = mysql_result(mysql_query("SELECT COUNT(*) FROM `ospf_ports` WHERE `ospfIfAdminStat` = 'enabled' AND `device_id` = '".$device['device_id']."'"),0);
$ip_query = "SELECT * FROM ipv4_addresses AS A, ports AS I WHERE ";
$ip_query .= "(A.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND I.interface_id = A.interface_id)";
$ip_query .= " AND I.device_id = '".$device['device_id']."'";
$ipv4_host = mysql_fetch_assoc(mysql_query($ip_query));
if($instance['ospfAdminStat'] == "enabled") { $enabled = '<span style="color: #00aa00">enabled</span>'; } else { $enabled = '<span style="color: #aaaaaa">disabled</span>'; }
if($instance['ospfAreaBdrRtrStatus'] == "true") { $abr = '<span style="color: #00aa00">yes</span>'; } else { $abr = '<span style="color: #aaaaaa">no</span>'; }
if($instance['ospfASBdrRtrStatus'] == "true") { $asbr = '<span style="color: #00aa00">yes</span>'; } else { $asbr = '<span style="color: #aaaaaa">no</span>'; }
echo('<tr bgcolor="'.$instance_bg.'">');
echo(' <td class="list-large">'.generate_device_link($device). '</td>');
echo(' <td class="list-large">'.$instance['ospfRouterId'] . '</td>');
echo(' <td>' . $enabled . '</td>');
echo(' <td>' . $abr . '</td>');
echo(' <td>' . $asbr . '</td>');
echo(' <td>' . $area_count . '</td>');
echo(' <td>' . $port_count . '('.$port_count_enabled.')</td>');
echo(' <td>' . ($neighbour_count+0) . '</td>');
echo('</tr>');
$i_i++;
} ### End loop instances
echo('</table>');
?>