summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2009-04-07 16:32:24 -0400
committerChris Buechler <cmb@pfsense.org>2009-04-07 16:32:24 -0400
commitbe3612916596fad3c899d603ae64563b440226ea (patch)
tree1b4fd3b53479f4563d5aa20051631839337217e2
parent974ff781f7163f288c176213e6c053c13da864d0 (diff)
parent329bb7646479d22b7ffa7c400f24c723b8425394 (diff)
downloadpfsense-be3612916596fad3c899d603ae64563b440226ea.zip
pfsense-be3612916596fad3c899d603ae64563b440226ea.tar.gz
Merge branch 'master' of git@rcs.pfsense.org:pfsense/mainline
-rwxr-xr-xusr/local/www/status_rrd_graph.php38
1 files changed, 26 insertions, 12 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index a4a07c6..0f3b420 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -42,6 +42,10 @@ if(! isset($config['rrd']['enable'])) {
header("Location: status_rrd_graph_settings.php");
}
+$rrddbpath = "/var/db/rrd/";
+/* XXX: (billm) do we have an exec() type function that does this type of thing? */
+exec("cd $rrddbpath;/usr/bin/find -name *.rrd", $databases);
+
if ($_GET['cat']) {
$curcat = $_GET['cat'];
} else {
@@ -55,14 +59,27 @@ if ($_GET['cat']) {
if ($_GET['option']) {
$curoption = $_GET['option'];
} else {
- if($curcat == "system") {
- $curoption = "processor";
- } else if($curcat == "queues") {
- $curoption = "queues";
- } else if($curcat == "queuedrops") {
- $curoption = "queuedrops";
- } else {
- $curoption = "wan";
+ switch($curcat) {
+ case "system":
+ $curoption = "processor";
+ break;
+ case "queues":
+ $curoption = "queues";
+ break;
+ case "queuedrops":
+ $curoption = "queuedrops";
+ case "quality":
+ foreach($databases as $database) {
+ if(preg_match("/[-]quality\.rrd/i", $database)) {
+ /* pick off the 1st database we find that matches the quality graph */
+ $name = explode("-", $database);
+ $curoption = "$name[0]";
+ continue 2;
+ }
+ }
+ default:
+ $curoption = "wan";
+ break;
}
}
@@ -76,10 +93,7 @@ if ($_GET['style']) {
}
}
-$rrddbpath = "/var/db/rrd/";
-
-/* XXX: (billm) do we have an exec() type function that does this type of thing? */
-exec("cd $rrddbpath;/usr/bin/find -name *.rrd", $databases);
+/* sort names reverse so WAN comes first */
rsort($databases);
/* these boilerplate databases are required for the other menu choices */
OpenPOWER on IntegriCloud