diff options
author | Warren Baker <warren@decoy.co.za> | 2011-01-28 17:16:19 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2011-01-28 17:16:19 +0200 |
commit | 20413b72bfd31282276c8ac2a116014f92914d4e (patch) | |
tree | 01a33a0783da5edda830302b96c98d5757fb13ba /usr/local/www/status_rrd_graph.php | |
parent | 9b2e42c9faef82b0e040f106737d7bc33a6ee7ed (diff) | |
download | pfsense-20413b72bfd31282276c8ac2a116014f92914d4e.zip pfsense-20413b72bfd31282276c8ac2a116014f92914d4e.tar.gz |
Added Captive Portal RRD graphs, there are two graphs one for the number of logged in users since last rrd poll, and concurrent number of users logged in.
Diffstat (limited to 'usr/local/www/status_rrd_graph.php')
-rwxr-xr-x | usr/local/www/status_rrd_graph.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 28b1b4c..4505a02 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -122,6 +122,9 @@ if ($_GET['option']) { continue 2; } } + case "captiveportal": + $curoption = "allgraphs"; + break; default: $curoption = "wan"; break; @@ -173,6 +176,7 @@ $dbheader = array("allgraphs-traffic.rrd", "allgraphs-wireless.rrd", "allgraphs-cellular.rrd", "allgraphs-vpnusers.rrd", + "captiveportal-allgraphs.rrd", "allgraphs-packets.rrd", "system-allgraphs.rrd", "system-throughput.rrd", @@ -196,6 +200,9 @@ foreach($databases as $database) { if(stristr($database, "-vpnusers")) { $vpnusers = true; } + if(stristr($database, "captiveportal-") && isset($config['captiveportal']['enable'])) { + $captiveportal = true; + } } /* append the existing array to the header */ $ui_databases = array_merge($dbheader, $databases); @@ -344,6 +351,10 @@ function get_dates($curperiod, $graph) { if($curcat == "vpnusers") { $tabactive = True; } else { $tabactive = False; } $tab_array[] = array("VPN", $tabactive, "status_rrd_graph.php?cat=vpnusers"); } + if($captiveportal) { + if($curcat == "captiveportal") { $tabactive = True; } else { $tabactive = False; } + $tab_array[] = array("Captive Portal", $tabactive, "status_rrd_graph.php?cat=captiveportal"); + } if($curcat == "custom") { $tabactive = True; } else { $tabactive = False; } $tab_array[] = array(gettext("Custom"), $tabactive, "status_rrd_graph.php?cat=custom"); if($curcat == "settings") { $tabactive = True; } else { $tabactive = False; } @@ -387,6 +398,11 @@ function get_dates($curperiod, $graph) { $replace = array(" :: ", "", $friendly); switch($curcat) { + case "captiveportal": + $optionc = str_replace($search, $replace, $optionc[1]); + echo "<option value=\"$optionc\""; + $prettyprint = ucwords(str_replace($search, $replace, $optionc)); + break; case "system": $optionc = str_replace($search, $replace, $optionc[1]); echo "<option value=\"$optionc\""; |