diff --git a/html/includes/graphs/device/mempool.inc.php b/html/includes/graphs/device/mempool.inc.php
index 52ea77cb1..95065a3d7 100644
--- a/html/includes/graphs/device/mempool.inc.php
+++ b/html/includes/graphs/device/mempool.inc.php
@@ -26,7 +26,7 @@ foreach(dbFetchRows("SELECT * FROM `mempools` where `device_id` = ?", array($id)
$rrd_options .= " DEF:mempoolused$i=$rrd_filename:used:AVERAGE ";
$rrd_options .= " CDEF:mempooltotal$i=mempoolused$i,mempoolused$i,mempoolfree$i,+,/,100,* ";
- $rrd_optionsb .= " AREA:mempooltotal$i#" . $colour . "10";
+ $rrd_options .= " AREA:mempooltotal$i#" . $colour . "10";
$rrd_optionsb .= " LINE1:mempooltotal$i#" . $colour . ":'" . $descr . "' ";
$rrd_optionsb .= " GPRINT:mempooltotal$i:MIN:%3.0lf%%";
diff --git a/html/includes/graphs/device/processor_separate.inc.php b/html/includes/graphs/device/processor_separate.inc.php
index d4f3eef5f..01507ac07 100644
--- a/html/includes/graphs/device/processor_separate.inc.php
+++ b/html/includes/graphs/device/processor_separate.inc.php
@@ -13,6 +13,7 @@ foreach ($procs as $proc)
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $descr;
$rrd_list[$i]['rra'] = "usage";
+ $rrd_list[$i]['area'] = 1;
$i++;
}
}
diff --git a/html/includes/graphs/generic_multi_line.inc.php b/html/includes/graphs/generic_multi_line.inc.php
index 1a8758b04..464e9d46d 100644
--- a/html/includes/graphs/generic_multi_line.inc.php
+++ b/html/includes/graphs/generic_multi_line.inc.php
@@ -36,23 +36,29 @@ foreach ($rrd_list as $rrd)
if ($rrd['invert'])
{
$rrd_options .= " CDEF:".$id."i=".$id.",-1,*";
- $rrd_options .= " LINE1.25:".$id."i#".$colour.":'$descr'";
+ $rrd_optionsb .= " LINE1.25:".$id."i#".$colour.":'$descr'";
+ $rrd_options .= " AREA:".$id."i#" . $colour . "10";
+
} else {
- $rrd_options .= " LINE1.25:".$id."#".$colour.":'$descr'";
+ $rrd_optionsb .= " LINE1.25:".$id."#".$colour.":'$descr'";
+ $rrd_options .= " AREA:".$id."#" . $colour . "10";
+
}
if(!$basicrrd)
{
- $rrd_options .= " GPRINT:".$id.":LAST:%5.2lf%s GPRINT:".$id."min:MIN:%5.2lf%s";
- $rrd_options .= " GPRINT:".$id."max:MAX:%5.2lf%s GPRINT:".$id.":AVERAGE:'%5.2lf%s\\n'";
+ $rrd_optionsb .= " GPRINT:".$id.":LAST:%5.2lf%s GPRINT:".$id."min:MIN:%5.2lf%s";
+ $rrd_optionsb .= " GPRINT:".$id."max:MAX:%5.2lf%s GPRINT:".$id.":AVERAGE:'%5.2lf%s\\n'";
} else {
- $rrd_options .= " GPRINT:".$id.":LAST:%5.2lf%s GPRINT:".$id.":MIN:%5.2lf%s";
- $rrd_options .= " GPRINT:".$id.":MAX:%5.2lf%s GPRINT:".$id.":AVERAGE:'%5.2lf%s\\n'";
+ $rrd_optionsb .= " GPRINT:".$id.":LAST:%5.2lf%s GPRINT:".$id.":MIN:%5.2lf%s";
+ $rrd_optionsb .= " GPRINT:".$id.":MAX:%5.2lf%s GPRINT:".$id.":AVERAGE:'%5.2lf%s\\n'";
}
$i++; $iter++;
}
-$rrd_options .= " HRULE:0#999999";
+$rrd_options .= $rrd_optionsb;
+
+$rrd_options .= " HRULE:0#555555";
?>
diff --git a/html/includes/print-vrf.inc.php b/html/includes/print-vrf.inc.php
index 2bd34cbd2..d84cf2b74 100644
--- a/html/includes/print-vrf.inc.php
+++ b/html/includes/print-vrf.inc.php
@@ -11,9 +11,9 @@ echo("
" . $vrf['mplsVpnVrfRouteDistinguisher'] . "<
echo(' | ');
foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVrf` = ?", array($device['device_id'], $vrf['vrf_id'])) as $port)
{
- if ($_GET['optb'] == "graphs")
+ if ($vars['view'] == "graphs")
{
- $graph_type = "port_" . $_GET['optc'];
+ $graph_type = "port_" . $vars['graph'];
echo("
".makeshortif($port['ifDescr'])."
'device',
- 'device' => $device['device_id'],
- 'tab' => 'health');
-
-
print_optionbar_start();
echo("Health » ");
diff --git a/html/pages/device/routing.inc.php b/html/pages/device/routing.inc.php
index 280fe6b01..998fd2607 100644
--- a/html/pages/device/routing.inc.php
+++ b/html/pages/device/routing.inc.php
@@ -1,5 +1,9 @@
'device',
+ 'device' => $device['device_id'],
+ 'tab' => 'routing');
+
#$type_text['overview'] = "Overview";
$type_text['ipsec_tunnels'] = "IPSEC Tunnels";
$type_text['bgp'] = "BGP";
@@ -15,25 +19,25 @@ unset($sep);
foreach ($routing_tabs as $type)
{
- if (!$_GET['optc']) { $_GET['optc'] = $type; }
+ if (!$vars['proto']) { $vars['proto'] = $type; }
echo($sep);
- if ($_GET['optc'] == $type)
+ if ($vars['proto'] == $type)
{
echo('"); }
+ echo(generate_link($type_text[$type] ." (".$device_routing_count[$type].")",$link_array,array('proto'=>$type)));
+ if ($vars['proto'] == $type) { echo(""); }
$sep = " | ";
}
print_optionbar_end();
-if (is_file("pages/device/routing/".mres($_GET['optc']).".inc.php"))
+if (is_file("pages/device/routing/".mres($vars['proto']).".inc.php"))
{
- include("pages/device/routing/".mres($_GET['optc']).".inc.php");
+ include("pages/device/routing/".mres($vars['proto']).".inc.php");
} else {
foreach ($routing_tabs as $type)
{
diff --git a/html/pages/device/routing/bgp.inc.php b/html/pages/device/routing/bgp.inc.php
index 990ac1cf8..2485314c4 100644
--- a/html/pages/device/routing/bgp.inc.php
+++ b/html/pages/device/routing/bgp.inc.php
@@ -3,47 +3,55 @@
'device',
+ 'device' => $device['device_id'],
+ 'tab' => 'routing',
+ 'proto' => 'bgp');
+
+if(!isset($vars['view'])) { $vars['view'] = "basic"; }
+
print_optionbar_start();
echo("BGP » ");
-if (!isset($_GET['optb'])) { echo(""); }
+if ($vars['view'] == "basic") { echo(""); }
echo(" | ");
-if ($_GET['optb'] == "updates") { echo(""); }
+if ($vars['view'] == "updates") { echo(""); }
echo(" | Prefixes: ");
-if ($_GET['optb'] == "prefixes_ipv4unicast") { echo(""); }
+if ($vars['view'] == "prefixes_ipv4unicast") { echo(""); }
echo(" | ");
-if ($_GET['optb'] == "prefixes_vpnv4unicast") { echo(""); }
+if ($vars['view'] == "prefixes_vpnv4unicast") { echo(""); }
echo(" | ");
-if ($_GET['optb'] == "prefixes_ipv6unicast") { echo(""); }
+if ($vars['view'] == "prefixes_ipv6unicast") { echo(""); }
echo(" | Traffic: ");
-if ($_GET['optb'] == "macaccounting_bits") { echo(""); }
+if ($vars['view'] == "macaccounting_bits") { echo(""); }
echo(" | ");
-if ($_GET['optb'] == "macaccounting_pkts") { echo(""); }
+if ($vars['view'] == "macaccounting_pkts") { echo(""); }
print_optionbar_end();
@@ -138,22 +146,22 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b
unset($invalid);
- switch ($_GET['optb'])
+ switch ($vars['view'])
{
case 'prefixes_ipv4unicast':
case 'prefixes_ipv4multicast':
case 'prefixes_ipv4vpn':
case 'prefixes_ipv6unicast':
case 'prefixes_ipv6multicast':
- list(,$afisafi) = explode("_", $_GET['optb']);
+ list(,$afisafi) = explode("_", $vars['view']);
if (isset($peer['afisafi'][$afisafi])) { $peer['graph'] = 1; }
# FIXME no break??
case 'updates':
- $graph_array['type'] = "bgp_" . $_GET['optb'];
+ $graph_array['type'] = "bgp_" . $vars['view'];
$graph_array['id'] = $peer['bgpPeer_id'];
}
- switch ($_GET['optb'])
+ switch ($vars['view'])
{
case 'macaccounting_bits':
case 'macaccounting_pkts':
@@ -163,11 +171,11 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b
{
$peer['graph'] = 1;
$graph_array['id'] = $acc['ma_id'];
- $graph_array['type'] = $_GET['optb'];
+ $graph_array['type'] = $vars['view'];
}
}
- if ($_GET['optb'] == 'updates') { $peer['graph'] = 1; }
+ if ($vars['view'] == 'updates') { $peer['graph'] = 1; }
if($peer['graph'])
{
diff --git a/html/pages/device/routing/vrf.inc.php b/html/pages/device/routing/vrf.inc.php
index 26c7b5fe4..38aa49ab1 100644
--- a/html/pages/device/routing/vrf.inc.php
+++ b/html/pages/device/routing/vrf.inc.php
@@ -1,8 +1,20 @@
'device',
+ 'device' => $device['device_id'],
+ 'tab' => 'routing',
+ 'proto' => 'vrf');
+
+#echo(generate_link("Basic", $link_array,array('view'=>'basic')));
+
+if(!isset($vars['view'])) { $vars['view'] = "basic"; }
+
print_optionbar_start();
+echo("VRFs » ");
+
$menu_options = array('basic' => 'Basic',
+# 'detail' => 'Detail',
);
if (!$_GET['opta']) { $_GET['opta'] = "basic"; }
@@ -10,10 +22,9 @@ if (!$_GET['opta']) { $_GET['opta'] = "basic"; }
$sep = "";
foreach ($menu_options as $option => $text)
{
- if ($_GET['optb'] == $option) { echo(""); }
+ if ($vars['view'] == $option) { echo(""); }
echo(" | ");
}
@@ -30,14 +41,14 @@ $graph_types = array("bits" => "Bits",
foreach ($graph_types as $type => $descr)
{
echo("$type_sep");
- if ($_GET['optc'] == $type) { echo(""); }
+ if ($vars['graph'] == $type) { echo(""); }
# echo('(');
-# if ($_GET['optb'] == $type) { echo(""); }
# echo(')');
$type_sep = " | ";
}
|