diff --git a/html/pages/routing.inc.php b/html/pages/routing.inc.php
index b13101b65..6892188a1 100644
--- a/html/pages/routing.inc.php
+++ b/html/pages/routing.inc.php
@@ -5,6 +5,8 @@ if ($_GET['optb'] == "graphs" || $_GET['optc'] == "graphs") { $graphs = "graphs"
print_optionbar_start('', '');
+ echo('Routing » ');
+
if ($_GET['opta'] == "overview") { echo(""); }
@@ -12,64 +14,12 @@ print_optionbar_start('', '');
echo(" | ");
## Start BGP Menu -- FIXME only show if BGP enabled?
- if ($_GET['opta'] == "bgp" && $_GET['optb'] == "all") { echo(""); }
-if(!isset($graphs)) { $graphs == "nographs"; }
-
-echo('
');
-
-if ($graphs == "graphs")
-{
- echo('');
-}
-
-echo(' | ');
-
-if ($graphs == "nographs")
-{
- echo('');
-}
-
-echo('
');
-
-print_optionbar_end();
+print_optionbar_end('', '');
switch ($_GET['opta'])
{
diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php
index cca4245c2..55298dab9 100644
--- a/html/pages/routing/bgp.inc.php
+++ b/html/pages/routing/bgp.inc.php
@@ -6,7 +6,78 @@ if ($_SESSION['userlevel'] < '5')
}
else
{
- echo("");
+
+ print_optionbar_start('', '');
+
+ echo('BGP » ');
+
+ if ($_GET['opta'] == "bgp" && $_GET['optb'] == "all") { echo(""); }
+ echo(' | ');
+ if ($_GET['opta'] == "bgp" && $_GET['optb'] == "internal") { echo(""); }
+ echo(" | ");
+ if ($_GET['opta'] == "bgp" && $_GET['optb'] == "external") { echo(""); }
+ echo(" | ");
+ if ($_GET['opta'] == "bgp" && $_GET['optb'] == "disabled") { echo(""); }
+ echo(" | ");
+ if ($_GET['opta'] == "bgp" && $_GET['optb'] == "alerts") { echo(""); }
+
+ echo('');
+ ## End BGP Menu
+
+ if(!isset($graphs)) { $graphs == "nographs"; }
+
+ echo('');
+
+ if ($graphs == "graphs") { echo('');
+ }
+
+ echo(' | ');
+
+ if ($graphs == "nographs")
+ {
+ echo('');
+ }
+
+ echo('
');
+
+ print_optionbar_end();
+
+
+ echo("");
+ echo("
");
echo(' | Local address | | Peer address | Type | Remote AS | State | Uptime |
');
$i = "1";
@@ -14,6 +85,8 @@ else
if ($_GET['optb'] == "alerts")
{
$where = "AND (B.bgpPeerAdminStatus = 'start' or B.bgpPeerAdminStatus = 'running') AND B.bgpPeerState != 'established'";
+ } elseif ($_GET['optb'] == "disabled") {
+ $where = "AND B.bgpPeerAdminStatus = 'stop'";
} elseif ($_GET['optb'] == "external") {
$where = "AND D.bgpLocalAs != B.bgpPeerRemoteAs";
} elseif ($_GET['optb'] == "internal") {
@@ -27,9 +100,9 @@ else
if (!is_integer($i/2)) { $bg_colour = $list_colour_b; } else { $bg_colour = $list_colour_a; }
- if ($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; if ($_GET['optb'] != "alerts") { $alert=1; $bg_image = "images/1px-pink.png"; } }
+ if ($peer['bgpPeerState'] == "established") { $col = "green"; } else { $col = "red"; $peer['alert']=1; }
if ($peer['bgpPeerAdminStatus'] == "start" || $peer['bgpPeerAdminStatus'] == "running") { $admin_col = "green"; } else { $admin_col = "gray"; }
-
+ if ($peer['bgpPeerAdminStatus'] == "stop") { $peer['alert']=0; $peer['disabled']=1; }
if ($peer['bgpPeerRemoteAs'] == $peer['bgpLocalAs']) { $peer_type = "iBGP"; } else { $peer_type = "eBGP";
if ($peer['bgpPeerRemoteAS'] >= '64512' && $peer['bgpPeerRemoteAS'] <= '65535') { $peer_type = "Priv eBGP"; }
}
@@ -48,7 +121,8 @@ else
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150";
$peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . "";
- echo('
+ echo('
|
" . $localaddresslink . " ".generate_device_link($peer, shorthost($peer['hostname']), 'routing/bgp/')." |
-> |