diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php
index 6e6c9c6964..b5f12a1cfd 100644
--- a/html/includes/print-menubar.php
+++ b/html/includes/print-menubar.php
@@ -252,7 +252,7 @@ if ($_SESSION['userlevel'] >= '5')
if ($bgp_alerts)
{
echo('
-
+echo('');
+echo(' | | Peer address | Type | Remote AS | State | Uptime |
');
-iBGP"; } else { $peer_type = "eBGP"; }
@@ -121,8 +121,12 @@ while ($peer = mysql_fetch_assoc($peer_query))
$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("
- | $i |
+ echo('
+ ");
+
+
+ echo(" | ".$i." |
" . $peeraddresslink . " ".generate_device_link($peer, shorthost($peer['hostname']), 'bgp/')." |
$peer_type |
" . (isset($peer_af) ? $peer_af : '') . " |
@@ -130,31 +134,40 @@ while ($peer = mysql_fetch_assoc($peer_query))
" . $peer['bgpPeerAdminStatus'] . " " . $peer['bgpPeerState'] . " |
" .formatUptime($peer['bgpPeerFsmEstablishedTime']). "
Updates " . $peer['bgpPeerInUpdates'] . "
- " . $peer['bgpPeerOutUpdates'] . " |
");
+
" . $peer['bgpPeerOutUpdates'] . "
+ ");
- if (isset($_GET['optb']) && $_GET['optb'] != "macaccounting")
+ if ($_GET['optb'] != "basic" && isset($_GET['optb']) && $_GET['optb'] != "macaccounting")
{
+
+ unset($graph_array);
foreach (explode(" ", $_GET['optb']) as $graph_type)
{
- 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";
- $daily_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$day&to=$now&width=500&height=150$afisafi";
- $weekly_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$week&to=$now&width=210&height=100$afisafi";
- $weekly_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$week&to=$now&width=500&height=150$afisafi";
- $monthly_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$month&to=$now&width=210&height=100$afisafi";
- $monthly_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$month&to=$now&width=500&height=150$afisafi";
- $yearly_traffic = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$year&to=$now&width=210&height=100$afisafi";
- $yearly_url = $config['base_url'] . "/graph.php?id=" . $peer['bgpPeer_id'] . "&type=bgp_$graph_type&from=$year&to=$now&width=500&height=150$afisafi";
- echo("");
- echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> ");
- echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> ");
- echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> ");
- echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> ");
- echo(" |
");
+
+ if ($graph_type == "prefixes")
+ {
+ $graph_array['type'] = "bgp_prefixes";
+ list($afi, $safi) = explode(".", $_GET['optc']);
+ $graph_array['afi'] = $afi;
+ $graph_array['safi'] = $safi;
+ } else {
+ $graph_array['type'] = "bgp_updates";
}
+
+ $graph_array['height'] = "100";
+ $graph_array['width'] = "215";
+ $graph_array['to'] = $now;
+ $graph_array['id'] = $peer['bgpPeer_id'];
+
+ if ($graph_type == "updates" || $valid_afi_safi[$afi][$safi])
+ {
+ echo('| ');
+ include("includes/print-quadgraphs.inc.php");
+ echo(" |
");
+ }
+
}
+
}
if ($_GET['opta'] == "macaccounting" && $has_macaccounting)
@@ -164,24 +177,18 @@ while ($peer = mysql_fetch_assoc($peer_query))
$database = $config['rrd_dir'] . "/" . $device['hostname'] . "/cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd";
if (is_file($database))
{
- $daily_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=210&height=100";
- $daily_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150";
- $weekly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$week&to=$now&width=210&height=100";
- $weekly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150";
- $monthly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$month&to=$now&width=210&height=100";
- $monthly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150";
- $yearly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$year&to=$now&width=210&height=100";
- $yearly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150";
- echo("");
- echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
- ");
- echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
- ");
- echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
- ");
- echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
- ");
+
+ $graph_array['graph_type'] = $graph_type;
+
+ $graph_array['height'] = "100";
+ $graph_array['width'] = "215";
+ $graph_array['to'] = $now;
+ $graph_array['id'] = $acc['ma_id'];
+
+ echo(' |
| ');
+ include("includes/print-quadgraphs.inc.php");
echo(" |
");
+
}
}
@@ -190,4 +197,4 @@ while ($peer = mysql_fetch_assoc($peer_query))
}
?>
-
+
diff --git a/html/pages/device/cefswitching.inc.php b/html/pages/device/routing/cef.inc.php
similarity index 91%
rename from html/pages/device/cefswitching.inc.php
rename to html/pages/device/routing/cef.inc.php
index 8f66cf625b..d179e78806 100644
--- a/html/pages/device/cefswitching.inc.php
+++ b/html/pages/device/routing/cef.inc.php
@@ -6,16 +6,18 @@ $menu_options = array('basic' => 'Basic',
'graphs' => 'Graphs',
);
-if (!$_GET['opta']) { $_GET['opta'] = "basic"; }
+if (!$_GET['optb']) { $_GET['opta'] = "basic"; }
+
+echo('
CEF » ');
$sep = "";
foreach ($menu_options as $option => $text)
{
echo($sep);
- if ($_GET['opta'] == $option) { echo(""); }
$sep = " | ";
}
diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php
index 55298dab9b..71a1b60584 100644
--- a/html/pages/routing/bgp.inc.php
+++ b/html/pages/routing/bgp.inc.php
@@ -76,7 +76,6 @@ else
print_optionbar_end();
- echo("
");
echo("
");
echo(' | Local address | | Peer address | Type | Remote AS | State | Uptime |
');
@@ -121,9 +120,9 @@ 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('
");
+
+ echo(" |
" . $localaddresslink . " ".generate_device_link($peer, shorthost($peer['hostname']), 'routing/bgp/')." |
-> |
" . $peeraddresslink . " |
@@ -138,7 +137,7 @@ else
if($graphs == "graphs")
{
$graph_array['height'] = "100";
- $graph_array['width'] = "215";
+ $graph_array['width'] = "216";
$graph_array['to'] = $now;
$graph_array['id'] = $peer['bgpPeer_id'];
$graph_array['type'] = "bgp_updates";
@@ -153,7 +152,7 @@ else
$i++;
}
- echo("
");
+ echo("");
}
?>
diff --git a/includes/rewrites.php b/includes/rewrites.php
index 45cfc043be..e8726462fd 100644
--- a/includes/rewrites.php
+++ b/includes/rewrites.php
@@ -44,6 +44,14 @@ function ifLabel ($interface, $device = NULL)
if (isset($config['os'][$os]['ifname']))
{
$interface['label'] = $interface['ifName'];
+
+ if($interface['ifName'] == "")
+ {
+ $interface['label'] = $interface['ifDescr'];
+ } else {
+ $interface['label'] = $interface['ifName'];
+ }
+
} elseif (isset($config['os'][$os]['ifalias']))
{
$interface['label'] = $interface['ifAlias'];
@@ -969,4 +977,4 @@ function rewrite_adslLineType($adslLineType)
return($adslLineType);
}
-?>
\ No newline at end of file
+?>
diff --git a/includes/static-config.php b/includes/static-config.php
index 48329050bd..bd6470bd5c 100644
--- a/includes/static-config.php
+++ b/includes/static-config.php
@@ -78,6 +78,7 @@ $config['os'][$os]['type'] = "server";
$os = "adva";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['text'] = "Adva Optical";
+
$config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Device Traffic";