');
-
-
+ ## BGP Sessions
if ($_SESSION['userlevel'] >= '5' && (isset($config['enable_bgp']) && $config['enable_bgp']))
{
echo('
- All BGP Sessions
+ - BGP
+ All Sessions
- External BGP
- Internal BGP ');
+ External Sessions
+ Internal Sessions ');
- echo('
');
+ echo('
+
');
}
## Do Alerts at the bottom
diff --git a/html/pages/device.inc.php b/html/pages/device.inc.php
index 2e8f801c78..11167d75e8 100644
--- a/html/pages/device.inc.php
+++ b/html/pages/device.inc.php
@@ -118,12 +118,23 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
');
}
+
+
if ($config['enable_bgp'] && $device['bgpLocalAs'])
{
- echo('-
+ $bgp_menu = '
-
BGP
+ ';
+ }
+
+ if(isset($bgp_menu) || isset($ospf_menu) || isset($isis_menu) || isset($eigrp_menu) || isset($bgp_menu))
+ {
+ echo('-
+
+
Routing
+
');
}
diff --git a/html/pages/device/routing.inc.php b/html/pages/device/routing.inc.php
new file mode 100644
index 0000000000..a79587d8ed
--- /dev/null
+++ b/html/pages/device/routing.inc.php
@@ -0,0 +1,47 @@
+');
+ }
+
+ echo(" " . $type_text[$type] ."");
+ if ($_GET['opta'] == $type) { echo(""); }
+ $sep = " | ";
+}
+
+print_optionbar_end();
+
+if (is_file("pages/device/routing/".mres($_GET['opta']).".inc.php"))
+{
+ include("pages/device/routing/".mres($_GET['opta']).".inc.php");
+} else {
+ foreach ($datas as $type)
+ {
+ if ($type != "overview")
+ {
+ $graph_title = $type_text[$type];
+ $graph_type = "device_".$type;
+ include("includes/print-device-graph.php");
+ }
+ }
+}
+
+?>
diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/routing/bgp.inc.php
similarity index 91%
rename from html/pages/device/bgp.inc.php
rename to html/pages/device/routing/bgp.inc.php
index 3b45b2f2d4..1aa0009571 100644
--- a/html/pages/device/bgp.inc.php
+++ b/html/pages/device/routing/bgp.inc.php
@@ -7,17 +7,17 @@ print_optionbar_start();
echo("
");
@@ -96,7 +96,7 @@ while ($peer = mysql_fetch_assoc($peer_query))
$graph_type = "bgp_updates";
$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'] . "";
+ $peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . "";
echo("
$i |
@@ -109,11 +109,11 @@ while ($peer = mysql_fetch_assoc($peer_query))
Updates " . $peer['bgpPeerInUpdates'] . "
" . $peer['bgpPeerOutUpdates'] . " ");
- if (isset($_GET['opta']) && $_GET['opta'] != "macaccounting")
+ if (isset($_GET['optb']) && $_GET['optb'] != "macaccounting")
{
- foreach (explode(" ", $_GET['opta']) as $graph_type)
+ foreach (explode(" ", $_GET['optb']) as $graph_type)
{
- if ($graph_type == "prefixes") { list($afi, $safi) = explode(".", $_GET['optb']); $afisafi = "&afi=$afi&safi=$safi"; }
+ if ($graph_type == "prefixes") { list($afi, $safi) = explode(".", $_GET['optc']); $afisafi = "&afi=$afi&safi=$safi"; }
if ($graph_type == "updates" || $valid_afi_safi[$afi][$safi])
{
$daily_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$day&to=$now&width=210&height=100$afisafi";
diff --git a/html/pages/routing.inc.php b/html/pages/routing.inc.php
new file mode 100644
index 0000000000..4da81eeb6d
--- /dev/null
+++ b/html/pages/routing.inc.php
@@ -0,0 +1,75 @@
+");
+ }
+
+ echo('' . $type_text[$type] ."");
+
+ if ($_GET['opta'] == $type) { echo(""); }
+
+ $sep = ' | ';
+}
+
+unset ($sep);
+
+echo('');
+
+if ($_GET['optb'] == "graphs")
+{
+ echo('');
+}
+
+echo(' | ');
+
+if ($_GET['optb'] == "nographs")
+{
+ echo('');
+}
+
+echo(' ');
+
+print_optionbar_end();
+
+switch ($_GET['opta'])
+{
+ case 'overview':
+ case 'bgp':
+ include('pages/routing/'.$_GET['opta'].'.inc.php');
+ break;
+ default:
+ echo("Error. Please report this to observium developers.");
+ break;
+}
+
+?>
diff --git a/html/pages/bgp.inc.php b/html/pages/routing/bgp.inc.php
similarity index 100%
rename from html/pages/bgp.inc.php
rename to html/pages/routing/bgp.inc.php
|