From f5e511d3fa553583b25ca9624fa4b9ee5a2d8882 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 21 Jul 2010 18:19:11 +0000 Subject: Remove priority from HFSC it is a null config option. Center most of the text in the center of a and add some space between objects. --- usr/local/www/firewall_shaper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr') diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php index 6618389..e456c61 100755 --- a/usr/local/www/firewall_shaper.php +++ b/usr/local/www/firewall_shaper.php @@ -341,9 +341,9 @@ $tree .= ""; if (!$dontshow || $newqueue) { -$output_form .= ""; -$output_form .= "Queue Actions"; -$output_form .= ""; +$output_form .= ""; +$output_form .= "
Queue Actions
"; +$output_form .= "
"; $output_form .= ""; if ($can_add || $addnewaltq) { @@ -368,9 +368,9 @@ if ($can_add || $addnewaltq) { $output_form .= " value=\"Disable shaper on interface\">"; $output_form .= ""; } -$output_form .= ""; +$output_form .= "
"; $output_form .= ""; -} +} else $output_form .= ""; -- cgit v1.1 From c55e45800d839e6e46d2704097d43563247fb06c Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 21 Jul 2010 23:18:00 -0400 Subject: only match with a space behind the IP, otherwise 10.0.0.6 CARP IP may match against interface IP 10.0.0.60, and show incorrect info on the CARP status page --- usr/local/www/carp_status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index 793a9ae..44dee95 100755 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -107,7 +107,7 @@ include("head.inc");

- + -- cgit v1.1 From d2ff48a06df5edbcd786994a77f28c7997974a0f Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 22 Jul 2010 19:10:01 +0000 Subject: Use correct boolean values as the logic implies. --- usr/local/www/services_rfc2136_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php index 97f8770..a7d9e7b 100644 --- a/usr/local/www/services_rfc2136_edit.php +++ b/usr/local/www/services_rfc2136_edit.php @@ -81,7 +81,7 @@ if ($_POST) { if (!$input_errors) { $rfc2136 = array(); - $rfc2136['enable'] = $_POST['enable'] ? false : true; + $rfc2136['enable'] = $_POST['enable'] ? true : false; $rfc2136['host'] = $_POST['host']; $rfc2136['ttl'] = $_POST['ttl']; $rfc2136['keyname'] = $_POST['keyname']; -- cgit v1.1 From d6a0379d291f5e98500776618559343f40254e40 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 22 Jul 2010 23:16:24 +0000 Subject: Add a subnet option to allowed ip addresses on CP. --- usr/local/www/services_captiveportal_ip.php | 6 ++++++ usr/local/www/services_captiveportal_ip_edit.php | 11 +++++++++++ 2 files changed, 17 insertions(+) (limited to 'usr') diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php index 29acb1c..1979519 100755 --- a/usr/local/www/services_captiveportal_ip.php +++ b/usr/local/www/services_captiveportal_ip.php @@ -59,10 +59,16 @@ if ($_GET['act'] == "del") { $ipent = $a_allowedips[$_GET['id']]; if (isset($config['captiveportal']['enable'])) { + if (!empty($ipent['sn'])) + $ipent['ip'] .= "/{$ipent['sn']}"; mwexec("/sbin/ipfw table 3 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 4 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 5 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 6 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 7 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 8 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 9 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 10 delete " . $ipent['ip']); } unset($a_allowedips[$_GET['id']]); diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php index 419327d..633900d 100755 --- a/usr/local/www/services_captiveportal_ip_edit.php +++ b/usr/local/www/services_captiveportal_ip_edit.php @@ -70,6 +70,7 @@ if (isset($_POST['id'])) if (isset($id) && $a_allowedips[$id]) { $pconfig['ip'] = $a_allowedips[$id]['ip']; + $pconfig['sn'] = $a_allowedips[$id]['sn']; $pconfig['dir'] = $a_allowedips[$id]['dir']; $pconfig['bw_up'] = $a_allowedips[$id]['bw_up']; $pconfig['bw_down'] = $a_allowedips[$id]['bw_down']; @@ -108,6 +109,7 @@ if ($_POST) { if (!$input_errors) { $ip = array(); $ip['ip'] = $_POST['ip']; + $ip['sn'] = $_POST['sn']; $ip['dir'] = $_POST['dir']; $ip['descr'] = $_POST['descr']; if ($_POST['bw_up']) @@ -116,9 +118,13 @@ if ($_POST) { $ip['bw_down'] = $_POST['bw_down']; if (isset($id) && $a_allowedips[$id]) { $oldip = $a_allowedips[$id]['ip']; + if (!empty($a_allowedips[$id]['sn'])) + $oldip .= "/{$a_allowedips[$id]['sn']}"; $a_allowedips[$id] = $ip; } else { $oldip = $ip['ip']; + if (!empty($$ip['sn'])) + $oldip .= "/{$$ip['sn']}"; $a_allowedips[] = $ip; } allowedips_sort(); @@ -168,6 +174,11 @@ include("head.inc"); -- cgit v1.1 From 002bc4ab3268e6e5cb3a01ce73a4c1624d09050a Mon Sep 17 00:00:00 2001 From: smos Date: Fri, 23 Jul 2010 09:59:58 +0200 Subject: Fix the glob() to return only the files, not the pathnames, use chdir() before. Fix a possible injection of ../ in the database path by using basename() Fix the week graph math so it is correct. --- usr/local/www/status_rrd_graph.php | 9 +++++---- usr/local/www/status_rrd_graph_img.php | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index c0d8814..770b61b 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -49,7 +49,9 @@ if(! isset($config['rrd']['enable'])) { } $rrddbpath = "/var/db/rrd/"; -$databases = glob("{$rrddbpath}*.rrd"); +chdir($rrddbpath); +$databases = glob("*.rrd"); + if ($_GET['cat']) { $curcat = $_GET['cat']; @@ -206,8 +208,8 @@ function get_dates($curperiod, $graph) { $end = mktime(0, 0, 0, $curmonth, (($curday + $offset) + 1), $curyear); break; case "week": - $start = mktime(0, 0, 0, $curmonth, (($curday + $curweekday) - $offset), $curyear); - $end = mktime(0, 0, 0, $curmonth, (($curday + $curweekday) + 7), $curyear); + $start = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + $offset), $curyear); + $end = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + 7), $curyear); break; case "month": $start = mktime(0, 0, 0, ($curmonth + $offset), 0, $curyear); @@ -330,7 +332,6 @@ function get_dates($curperiod, $graph) { echo " selected "; } echo ">" . htmlspecialchars($prettyprint) . "\n"; - } ?> diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index 567d272..321e6f9 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. */ /* - pfSense_BUILDER_BINARIES: /usr/bin/find /bin/rm /usr/local/bin/rrdtool + pfSense_BUILDER_BINARIES: /bin/rm /usr/local/bin/rrdtool pfSense_MODULE: system */ @@ -40,7 +40,7 @@ require_once("rrd.inc"); $pgtitle = array("System","RRD Graphs","Image viewer"); if ($_GET['database']) { - $curdatabase = $_GET['database']; + $curdatabase = basename($_GET['database']); } else { $curdatabase = "wan-traffic.rrd"; } @@ -146,8 +146,9 @@ $havg = timeDiff($average, $defOptions); $hperiod = timeDiff($seconds, $defOptions); $data = true; -/* XXX: (billm) do we have an exec() type function that does this type of thing? */ -exec("cd $rrddbpath;/usr/bin/find -name *.rrd", $databases); +$rrddbpath = "/var/db/rrd/"; +chdir($rrddbpath); +$databases = glob("*.rrd"); rsort($databases); /* compare bytes/sec counters, divide bps by 8 */ -- cgit v1.1 From 9dc3798253279a13ddaae6d6a04269f85c27de5b Mon Sep 17 00:00:00 2001 From: smos Date: Fri, 23 Jul 2010 10:28:02 +0200 Subject: Further correct week graph, weeks start at monday, not sunday. Make previous week work too. --- usr/local/www/status_rrd_graph.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 770b61b..a3103f8 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -192,7 +192,7 @@ function get_dates($curperiod, $graph) { $curyear = date('Y', $now); $curmonth = date('m', $now); $curweek = date('W', $now); - $curweekday = date('w', $now); + $curweekday = date('N', $now) - 1; // We want to start on monday $curday = date('d', $now); switch($curperiod) { @@ -208,8 +208,16 @@ function get_dates($curperiod, $graph) { $end = mktime(0, 0, 0, $curmonth, (($curday + $offset) + 1), $curyear); break; case "week": - $start = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + $offset), $curyear); - $end = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + 7), $curyear); + switch($offset) { + case 0; + $weekoffset = 0; + break; + default: + $weekoffset = ($offset * 7) - 7; + break; + } + $start = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + $weekoffset), $curyear); + $end = mktime(0, 0, 0, $curmonth, (($curday - $curweekday) + $weekoffset + 7), $curyear); break; case "month": $start = mktime(0, 0, 0, ($curmonth + $offset), 0, $curyear); -- cgit v1.1 From 6b0c5ae66c89f75cca03895cb52769db9faa6836 Mon Sep 17 00:00:00 2001 From: smos Date: Fri, 23 Jul 2010 11:40:11 +0200 Subject: The custom graph option now works, this needs for a certain someone to integrate a nice date picker that updates the fields with the correct seconds. Add tab for VPN databases which we don't have yet. --- usr/local/www/status_rrd_graph.php | 126 +++++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 47 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index a3103f8..036a3b2 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -109,12 +109,22 @@ if ($_GET['option']) { continue 2; } } + case "vpn": + foreach($databases as $database) { + if(preg_match("/[-]vpn\.rrd/i", $database)) { + /* pick off the 1st database we find that matches the VPN graphs */ + $name = explode("-", $database); + $curoption = "$name[0]"; + continue 2; + } + } default: $curoption = "wan"; break; } } +$now = time(); if($curcat == "custom") { if (is_numeric($_GET['start'])) { if($start < ($now - (3600 * 24 * 365 * 5))) { @@ -157,6 +167,7 @@ $dbheader = array("allgraphs-traffic.rrd", "allgraphs-quality.rrd", "allgraphs-wireless.rrd", "allgraphs-cellular.rrd", + "allgraphs-vpn.rrd", "allgraphs-packets.rrd", "system-allgraphs.rrd", "system-throughput.rrd", @@ -174,6 +185,9 @@ foreach($databases as $database) { if(stristr($database, "cellular")) { $cellular = true; } + if(stristr($database, "vpn")) { + $vpn = true; + } } /* append the existing array to the header */ $ui_databases = array_merge($dbheader, $databases); @@ -276,6 +290,10 @@ function get_dates($curperiod, $graph) { if($curcat == "cellular") { $tabactive = True; } else { $tabactive = False; } $tab_array[] = array("Cellular", $tabactive, "status_rrd_graph.php?cat=cellular"); } + if($vpn) { + if($curcat == "vpn") { $tabactive = True; } else { $tabactive = False; } + $tab_array[] = array("VPN", $tabactive, "status_rrd_graph.php?cat=vpn"); + } if($curcat == "custom") { $tabactive = True; } else { $tabactive = False; } $tab_array[] = array("Custom", $tabactive, "status_rrd_graph.php?cat=custom"); if($curcat == "settings") { $tabactive = True; } else { $tabactive = False; } @@ -369,59 +387,73 @@ function get_dates($curperiod, $graph) { } } ?> - - + + + + + + \n"; + } + } else { + foreach($graphs as $graph) { + /* check which databases are valid for our category */ + foreach($ui_databases as $curdatabase) { + if(! preg_match("/($curcat)/i", $curdatabase)) { + continue; + } + $optionc = split("-", $curdatabase); + $search = array("-", ".rrd", $optionc); + $replace = array(" :: ", "", $friendly); + switch($curoption) { + case "outbound": + /* only show interfaces with a gateway */ + $optionc = "$optionc[0]"; + if(!interface_has_gateway($optionc)) { + if(!preg_match("/($optionc)-(quality)/", $curdatabase)) { + continue 2; + } + } + if(! preg_match("/($optionc)[-.]/i", $curdatabase)) { continue 2; } - } - if(! preg_match("/($optionc)[-.]/i", $curdatabase)) { - continue 2; - } - break; - case "allgraphs": - /* make sure we do not show the placeholder databases in the all view */ - if((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) { - continue 2; - } - break; - default: - /* just use the name here */ - if(! preg_match("/($curoption)[-.]/i", $curdatabase)) { - continue 2; - } - } - if(in_array($curdatabase, $databases)) { - $dates = get_dates($curperiod, $graph); - $start = $dates['start']; - $end = $dates['end']; - echo "\n"; + break; + case "allgraphs": + /* make sure we do not show the placeholder databases in the all view */ + if((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) { + continue 2; + } + break; + default: + /* just use the name here */ + if(! preg_match("/($curoption)[-.]/i", $curdatabase)) { + continue 2; + } + } + if(in_array($curdatabase, $databases)) { + $dates = get_dates($curperiod, $graph); + $start = $dates['start']; + $end = $dates['end']; + echo "\n"; + } } } } -- cgit v1.1 From edd2d8b736bb445880fb70f4413875d450a6ec54 Mon Sep 17 00:00:00 2001 From: smos Date: Fri, 23 Jul 2010 16:04:39 +0200 Subject: Add OpenVPN users database, sync the tabs on the settings page. Graphing page doesn't know about openvpn users yet. But that's ok. --- usr/local/www/status_rrd_graph.php | 26 ++++++++--------- usr/local/www/status_rrd_graph_settings.php | 43 +++++++++++++++++------------ 2 files changed, 38 insertions(+), 31 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 036a3b2..08e2df3 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -109,9 +109,9 @@ if ($_GET['option']) { continue 2; } } - case "vpn": + case "vpnusers": foreach($databases as $database) { - if(preg_match("/[-]vpn\.rrd/i", $database)) { + if(preg_match("/[-]vpnusers\.rrd/i", $database)) { /* pick off the 1st database we find that matches the VPN graphs */ $name = explode("-", $database); $curoption = "$name[0]"; @@ -167,7 +167,7 @@ $dbheader = array("allgraphs-traffic.rrd", "allgraphs-quality.rrd", "allgraphs-wireless.rrd", "allgraphs-cellular.rrd", - "allgraphs-vpn.rrd", + "allgraphs-vpnusers.rrd", "allgraphs-packets.rrd", "system-allgraphs.rrd", "system-throughput.rrd", @@ -176,17 +176,17 @@ $dbheader = array("allgraphs-traffic.rrd", "outbound-traffic.rrd"); foreach($databases as $database) { - if(stristr($database, "wireless")) { + if(stristr($database, "-wireless")) { $wireless = true; } - if(stristr($database, "queues")) { + if(stristr($database, "-queues")) { $queues = true; } - if(stristr($database, "cellular")) { + if(stristr($database, "-cellular")) { $cellular = true; } - if(stristr($database, "vpn")) { - $vpn = true; + if(stristr($database, "-vpnusers")) { + $vpnusers = true; } } /* append the existing array to the header */ @@ -278,9 +278,9 @@ function get_dates($curperiod, $graph) { $tab_array[] = array("Quality", $tabactive, "status_rrd_graph.php?cat=quality"); if($queues) { if($curcat == "queues") { $tabactive = True; } else { $tabactive = False; } - $tab_array[] = array("Queues", $tabactive, "status_rrd_graph.php?cat=queues"); + $tab_array[] = array("Queues", $tabactive, "status_rrd_graph.php?cat=queues"); if($curcat == "queuedrops") { $tabactive = True; } else { $tabactive = False; } - $tab_array[] = array("QueueDrops", $tabactive, "status_rrd_graph.php?cat=queuedrops"); + $tab_array[] = array("QueueDrops", $tabactive, "status_rrd_graph.php?cat=queuedrops"); } if($wireless) { if($curcat == "wireless") { $tabactive = True; } else { $tabactive = False; } @@ -290,9 +290,9 @@ function get_dates($curperiod, $graph) { if($curcat == "cellular") { $tabactive = True; } else { $tabactive = False; } $tab_array[] = array("Cellular", $tabactive, "status_rrd_graph.php?cat=cellular"); } - if($vpn) { - if($curcat == "vpn") { $tabactive = True; } else { $tabactive = False; } - $tab_array[] = array("VPN", $tabactive, "status_rrd_graph.php?cat=vpn"); + if($vpnusers) { + if($curcat == "vpnusers") { $tabactive = True; } else { $tabactive = False; } + $tab_array[] = array("VPN", $tabactive, "status_rrd_graph.php?cat=vpnusers"); } if($curcat == "custom") { $tabactive = True; } else { $tabactive = False; } $tab_array[] = array("Custom", $tabactive, "status_rrd_graph.php?cat=custom"); diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php index d1398c4..7f8d4ae 100755 --- a/usr/local/www/status_rrd_graph_settings.php +++ b/usr/local/www/status_rrd_graph_settings.php @@ -106,32 +106,39 @@ include("head.inc"); -- cgit v1.1 From 8aa09d6d344bbad31a21cf62cf618ec77182b6a5 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Fri, 23 Jul 2010 18:30:13 -0400 Subject: remove empty note, redirect to correct page --- usr/local/www/services_rfc2136.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr') diff --git a/usr/local/www/services_rfc2136.php b/usr/local/www/services_rfc2136.php index 80edc0b..a8e9913 100644 --- a/usr/local/www/services_rfc2136.php +++ b/usr/local/www/services_rfc2136.php @@ -48,7 +48,7 @@ if ($_GET['act'] == "del") { write_config(); - header("Location: services_dyndns.php"); + header("Location: services_rfc2136.php"); exit; } @@ -105,9 +105,9 @@ include("head.inc"); -- cgit v1.1 From 3869a323ffa9507de3d2422e0a2349015f86a66e Mon Sep 17 00:00:00 2001 From: smos Date: Sat, 24 Jul 2010 21:40:22 +0200 Subject: Add the openvpn users graph, add the colors to all the themes colors include. Add vpn tab on the settings page, it didn't show although it should. --- usr/local/www/status_rrd_graph_img.php | 20 ++++++++++++++++++++ usr/local/www/status_rrd_graph_settings.php | 9 +++++++-- usr/local/www/themes/code-red/rrdcolors.inc.php | 1 + usr/local/www/themes/metallic/rrdcolors.inc.php | 1 + usr/local/www/themes/nervecenter/rrdcolors.inc.php | 1 + .../www/themes/pfsense-dropdown/rrdcolors.inc.php | 1 + usr/local/www/themes/pfsense/rrdcolors.inc.php | 1 + usr/local/www/themes/pfsense_ng/rrdcolors.inc.php | 1 + usr/local/www/themes/the_wall/rrdcolors.inc.php | 1 + 9 files changed, 34 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index 321e6f9..89baadd 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -206,6 +206,7 @@ if(file_exists($rrdcolors)) { $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); + $colorvpnusers = array('990000'); } switch ($curstyle) { @@ -571,6 +572,25 @@ elseif((strstr($curdatabase, "-wireless.rrd")) && (file_exists("$rrddbpath$curda $graphcmd .= "COMMENT:\"\\n\" "; $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" "; } +elseif((strstr($curdatabase, "-vpnusers.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for vpn users stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end "; + $graphcmd .= "--vertical-label \"users\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-users=$rrddbpath$curdatabase:users:AVERAGE\" "; + $graphcmd .= "LINE2:\"$curif-users#{$colorvpnusers[0]}:$curif-users\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t maximum\t\t average\t current\\n\" "; + $graphcmd .= "COMMENT:\"Users Online\t\" "; + $graphcmd .= "GPRINT:\"$curif-users:MAX:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-users:AVERAGE:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-users:LAST:%7.2lf \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" "; +} elseif((strstr($curdatabase, "-states.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { /* define graphcmd for states stats */ $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php index 7f8d4ae..cfd1a0e 100755 --- a/usr/local/www/status_rrd_graph_settings.php +++ b/usr/local/www/status_rrd_graph_settings.php @@ -77,9 +77,11 @@ if ($_POST) { } } + + $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); +chdir($rrddbpath); +$databases = glob("*.rrd"); foreach($databases as $database) { if(stristr($database, "wireless")) { @@ -91,6 +93,9 @@ foreach($databases as $database) { if(stristr($database, "cellular")) { $cellular = true; } + if(stristr($database, "-vpnusers")) { + $vpnusers = true; + } } $pgtitle = array("Status","RRD Graphs"); diff --git a/usr/local/www/themes/code-red/rrdcolors.inc.php b/usr/local/www/themes/code-red/rrdcolors.inc.php index cbd6a8d..1ab0fd0 100755 --- a/usr/local/www/themes/code-red/rrdcolors.inc.php +++ b/usr/local/www/themes/code-red/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('990000','a83c3c','b36666'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> diff --git a/usr/local/www/themes/metallic/rrdcolors.inc.php b/usr/local/www/themes/metallic/rrdcolors.inc.php index e3153fd..8e74545 100644 --- a/usr/local/www/themes/metallic/rrdcolors.inc.php +++ b/usr/local/www/themes/metallic/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> diff --git a/usr/local/www/themes/nervecenter/rrdcolors.inc.php b/usr/local/www/themes/nervecenter/rrdcolors.inc.php index e3153fd..8e74545 100644 --- a/usr/local/www/themes/nervecenter/rrdcolors.inc.php +++ b/usr/local/www/themes/nervecenter/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> diff --git a/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php b/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php index e3153fd..8e74545 100644 --- a/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php +++ b/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> diff --git a/usr/local/www/themes/pfsense/rrdcolors.inc.php b/usr/local/www/themes/pfsense/rrdcolors.inc.php index e3153fd..8e74545 100644 --- a/usr/local/www/themes/pfsense/rrdcolors.inc.php +++ b/usr/local/www/themes/pfsense/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> diff --git a/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php b/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php index e3153fd..8e74545 100644 --- a/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php +++ b/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> diff --git a/usr/local/www/themes/the_wall/rrdcolors.inc.php b/usr/local/www/themes/the_wall/rrdcolors.inc.php index e3153fd..8e74545 100644 --- a/usr/local/www/themes/the_wall/rrdcolors.inc.php +++ b/usr/local/www/themes/the_wall/rrdcolors.inc.php @@ -46,5 +46,6 @@ $colorqualityloss = "ee0000"; $colorwireless = array('333333','a83c3c','999999'); $colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); $colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600'); +$colorvpnusers = array('990000'); ?> -- cgit v1.1 From 6216690bf06f77d39559445bb8f2da42f255e54c Mon Sep 17 00:00:00 2001 From: smos Date: Sat, 24 Jul 2010 22:10:43 +0200 Subject: Correct my email address, adjust copyright to 2010 --- usr/local/www/diag_logs_relayd.php | 2 +- usr/local/www/status_gateway_groups.php | 2 +- usr/local/www/status_gateways.php | 2 +- usr/local/www/status_lb_pool.php | 2 +- usr/local/www/status_lb_vs.php | 2 +- usr/local/www/status_rrd_graph.php | 2 +- usr/local/www/status_rrd_graph_img.php | 2 +- usr/local/www/status_rrd_graph_settings.php | 2 +- usr/local/www/status_upnp.php | 2 +- usr/local/www/system_gateway_groups.php | 2 +- usr/local/www/system_gateway_groups_edit.php | 2 +- usr/local/www/system_gateways.php | 2 +- usr/local/www/system_gateways_edit.php | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) (limited to 'usr') diff --git a/usr/local/www/diag_logs_relayd.php b/usr/local/www/diag_logs_relayd.php index 8ce35b8..57df0e1 100755 --- a/usr/local/www/diag_logs_relayd.php +++ b/usr/local/www/diag_logs_relayd.php @@ -5,7 +5,7 @@ part of pfSense Copyright (C) 2008 Bill Marquette . - Copyright (C) 2008 Seth Mos . + Copyright (C) 2008 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_gateway_groups.php b/usr/local/www/status_gateway_groups.php index 5ed4aa9..2a91b77 100755 --- a/usr/local/www/status_gateway_groups.php +++ b/usr/local/www/status_gateway_groups.php @@ -4,7 +4,7 @@ status_gateway_groups.php part of pfSense (http://pfsense.com) - Copyright (C) 2007 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index 72e14b2..bffdb3b 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -4,7 +4,7 @@ status_gateways.php part of pfSense (http://www.pfsense.com/) - Copyright (C) 2006 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 18b4c57..5a87e35 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -4,7 +4,7 @@ status_lb_pool.php part of pfSense (http://www.pfsense.com/) - Copyright (C) 2006 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_lb_vs.php b/usr/local/www/status_lb_vs.php index 0589425..5d74cf3 100755 --- a/usr/local/www/status_lb_vs.php +++ b/usr/local/www/status_lb_vs.php @@ -4,7 +4,7 @@ status_lb_vs.php part of pfSense (http://www.pfsense.com/) - Copyright (C) 2007 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 08e2df3..97454c9 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -3,7 +3,7 @@ /* status_rrd_graph.php Part of pfSense - Copyright (C) 2007 Seth Mos + Copyright (C) 2007 Seth Mos All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index 89baadd..c559d3d 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -3,7 +3,7 @@ /* status_rrd_graph_img.php Part of pfSense - Copyright (C) 2009 Seth Mos + Copyright (C) 2009 Seth Mos All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php index cfd1a0e..b173e00 100755 --- a/usr/local/www/status_rrd_graph_settings.php +++ b/usr/local/www/status_rrd_graph_settings.php @@ -3,7 +3,7 @@ /* status_rrd_graph.php Part of pfSense - Copyright (C) 2007 Seth Mos + Copyright (C) 2007 Seth Mos All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/status_upnp.php b/usr/local/www/status_upnp.php index 024633f..e5908d3 100644 --- a/usr/local/www/status_upnp.php +++ b/usr/local/www/status_upnp.php @@ -4,7 +4,7 @@ status_upnp.php part of pfSense (http://www.pfsense.com/) - Copyright (C) 2006 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/system_gateway_groups.php b/usr/local/www/system_gateway_groups.php index 43dfea7..f767aff 100755 --- a/usr/local/www/system_gateway_groups.php +++ b/usr/local/www/system_gateway_groups.php @@ -4,7 +4,7 @@ system_gateway_groups.php part of pfSense (http://pfsense.com) - Copyright (C) 2007 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index 1a504c5..268a5da 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -4,7 +4,7 @@ system_gateway_groups_edit.php part of pfSense (http://pfsense.com) - Copyright (C) 2007 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php index 82004a7..d789d76 100755 --- a/usr/local/www/system_gateways.php +++ b/usr/local/www/system_gateways.php @@ -4,7 +4,7 @@ system_gateways.php part of pfSense (http://pfsense.com) - Copyright (C) 2007 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 98d1e81..e679b90 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -4,7 +4,7 @@ system_gateways_edit.php part of pfSense (http://pfsense.com) - Copyright (C) 2007 Seth Mos . + Copyright (C) 2010 Seth Mos . All rights reserved. Redistribution and use in source and binary forms, with or without -- cgit v1.1 From 36b03cc70e4318391a096825421532e26ccfc66d Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Sun, 25 Jul 2010 15:08:07 -0400 Subject: Use more appropriate advice here for community string --- usr/local/www/services_snmp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php index 9540d98..a9f8b7b 100755 --- a/usr/local/www/services_snmp.php +++ b/usr/local/www/services_snmp.php @@ -290,7 +290,7 @@ function enable_change(whichone) { -- cgit v1.1
Carp Interface
CARP Interface
Virtual IP
Status
IP address +
IP address
\n"; + echo "\"$prettydb\n"; + echo "


\n"; + echo "
\n"; - echo "\"$prettydb\n"; - echo "


\n"; - echo "
\n"; + echo "\"$prettydb\n"; + echo "


\n"; + echo "

- Note:
+
- Add something meaningful here. +

 
Read Community String -
In most cases, "public" is used here
+
The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.