summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-03-12 00:34:53 +0100
committerSeth Mos <seth.mos@xs4all.nl>2009-03-12 00:36:24 +0100
commita927edffbc42f16743264240f1da7f30eaa19676 (patch)
tree136d85ce26d1814ce78a744f55c7cddcf752b28b
parentd2c5fcc12df9aae4fd505ac1633eafcdfdd1c733 (diff)
downloadpfsense-a927edffbc42f16743264240f1da7f30eaa19676.zip
pfsense-a927edffbc42f16743264240f1da7f30eaa19676.tar.gz
Fixed the outbound macro for displaying the outbound interfaces with the Quality Graphs
Make sure we show either the gateway name or interface name on the graph top header
-rwxr-xr-xusr/local/www/status_rrd_graph.php12
-rw-r--r--usr/local/www/status_rrd_graph_img.php3
2 files changed, 9 insertions, 6 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index a4419c7..facc807 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -94,7 +94,7 @@ $dbheader = array("allgraphs-traffic.rrd",
"outbound-traffic.rrd");
/* append the existing array to the header */
-$databases = array_merge($dbheader, $databases);
+$ui_databases = array_merge($dbheader, $databases);
$styles = array('inverse' => 'Inverse',
'absolute' => 'Absolute');
@@ -148,7 +148,7 @@ include("head.inc");
<select name="option" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<?php
- foreach ($databases as $db => $database) {
+ foreach ($ui_databases as $db => $database) {
if(! preg_match("/($curcat)/i", $database)) {
continue;
}
@@ -198,7 +198,7 @@ include("head.inc");
foreach($periods as $period => $interval) {
/* check which databases are valid for our category */
- foreach($databases as $curdatabase) {
+ foreach($ui_databases as $curdatabase) {
if(! preg_match("/($curcat)/i", $curdatabase)) {
continue;
}
@@ -210,7 +210,9 @@ include("head.inc");
/* only show interfaces with a gateway */
$optionc = "$optionc[0]";
if(!interface_has_gateway($optionc)) {
- continue 2;
+ if(!preg_match("/($optionc)-(quality)/", $curdatabase)) {
+ continue 2;
+ }
}
if(! preg_match("/($optionc)[-.]/i", $curdatabase)) {
continue 2;
@@ -235,8 +237,6 @@ include("head.inc");
echo "SRC=\"status_rrd_graph_img.php?interval=$interval&amp;database={$curdatabase}&amp;style={$curstyle}\" />\n";
echo "<br /><hr><br />\n";
echo "</td></tr>\n";
- } else {
- echo "<b>There is no database available to generate $prettydb from.</b>";
}
}
}
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index 444fb22..556f158 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -54,6 +54,9 @@ if ($_GET['interval']) {
$curif = split("-", $curdatabase);
$curif = "$curif[0]";
$friendly = convert_friendly_interface_to_friendly_descr(strtolower($curif));
+if($friendly == "") {
+ $friendly = $curif;
+}
$search = array("-", ".rrd", $curif);
$replace = array(" :: ", "", $friendly);
$prettydb = ucwords(str_replace($search, $replace, $curdatabase));
OpenPOWER on IntegriCloud