mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
routing overview start
git-svn-id: http://www.observium.org/svn/observer/trunk@2177 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -47,9 +47,20 @@ if (is_file("pages/device/routing/".mres($_GET['opta']).".inc.php"))
|
||||
{
|
||||
if ($type != "overview")
|
||||
{
|
||||
$graph_title = $type_text[$type];
|
||||
$graph_type = "device_".$type;
|
||||
include("includes/print-device-graph.php");
|
||||
if(is_file("pages/device/routing/overview/".mres($type).".inc.php")) {
|
||||
|
||||
$g_i++;
|
||||
if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||
|
||||
echo('<div style="background-color: '.$row_colour.';">');
|
||||
echo('<div style="padding:4px 0px 0px 8px;" class=graphhead>'.$type_text[$type].'</div>');
|
||||
include("pages/device/routing/overview/".mres($type).".inc.php");
|
||||
echo('</div>');
|
||||
} else {
|
||||
$graph_title = $type_text[$type];
|
||||
$graph_type = "device_".$type;
|
||||
include("includes/print-device-graph.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
<?php
|
||||
|
||||
echo("<strong>AS".$device['bgpLocalAs']."</strong>");
|
||||
|
||||
echo("<br />");
|
||||
|
||||
$total = mysql_result(mysql_query("SELECT count(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."'"),0);
|
||||
$up = mysql_result(mysql_query("SELECT count(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."' AND `bgpPeerState` = 'established'"),0);
|
||||
$stop = mysql_result(mysql_query("SELECT count(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."' AND `bgpPeerAdminStatus` = 'stop'"),0);
|
||||
|
||||
echo("Sessions: ".$total." Up: ".$up." Down: ".($total-$up) . ($stop != 0 ? " ( Shutdown: ".$stop." )" : ""));
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
echo("<pre>");
|
||||
print_r(mysql_fetch_assoc(mysql_query("SELECT * FROM `ospf_instances` WHERE `device_id` = '".$device['device_id']."'")));
|
||||
echo("</pre>");
|
||||
?>
|
||||
Reference in New Issue
Block a user