diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-02-06 15:52:19 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-02-06 15:54:47 -0200 |
commit | cba9d7d9a5edd4d2b49768a536740b288da99300 (patch) | |
tree | d5818f8a323ed7659d3e8ed0ef02036e87e0801b /usr/local/bin | |
parent | 2e19a6834fb8b3f2e6f74278be9b9407d7c9d638 (diff) | |
download | pfsense-cba9d7d9a5edd4d2b49768a536740b288da99300.zip pfsense-cba9d7d9a5edd4d2b49768a536740b288da99300.tar.gz |
Adjust RRD captive portal graphs for CP zones
- Create RRD configs per zone
- Add tabs to see graphs per zone
- Migrate existing rrd files to default cpZone
- While I'm here, call unset() for $rrdcreate and $rrdupdatesh
Resolves #2655
Diffstat (limited to 'usr/local/bin')
-rw-r--r-- | usr/local/bin/captiveportal_gather_stats.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/bin/captiveportal_gather_stats.php b/usr/local/bin/captiveportal_gather_stats.php index 5e9f340..63d91a2 100644 --- a/usr/local/bin/captiveportal_gather_stats.php +++ b/usr/local/bin/captiveportal_gather_stats.php @@ -32,6 +32,11 @@ require_once("functions.inc"); require_once("captiveportal.inc"); require_once("util.inc"); +global $cpzone; + +$cpzone = $argv[1]; +$type = $argv[2]; + /* read in captive portal db */ $cpdb = captiveportal_read_db(); @@ -45,8 +50,6 @@ $current_user_count = 0; /* tmp file to use to store old data (per interface)*/ $tmpfile = "{$g['vardb_path']}/captiveportal_online_users"; -$type = $argv[1]; - if(empty($type)) exit; @@ -73,7 +76,6 @@ if ($type == "loggedin") { } @fclose($fd); - foreach($cpdb as $user) { $user_ip = $user[2]; // Record the timestamp |