summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/firewall_shaper.php3
-rwxr-xr-xusr/local/www/firewall_shaper_queues.php3
-rwxr-xr-xusr/local/www/firewall_shaper_wizards.php23
-rw-r--r--usr/local/www/status_rrd_graph_img.php6
4 files changed, 32 insertions, 3 deletions
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php
index c8d8b8a..f8e0dea 100755
--- a/usr/local/www/firewall_shaper.php
+++ b/usr/local/www/firewall_shaper.php
@@ -264,6 +264,9 @@ if ($_GET) {
else
$savemsg = $retval;
+ /* reset rrd queues */
+ system("rm -f /var/db/rrd/*queuedrops.rrd");
+ system("rm -f /var/db/rrd/*queues.rrd");
enable_rrd_graphing();
unlink($d_shaperconfdirty_path);
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php
index f3da5a6..b21ab26 100755
--- a/usr/local/www/firewall_shaper_queues.php
+++ b/usr/local/www/firewall_shaper_queues.php
@@ -120,6 +120,9 @@ if ($_POST['apply']) {
else
$savemsg = $retval;
+ /* reset rrd queues */
+ system("rm -f /var/db/rrd/*queuedrops.rrd");
+ system("rm -f /var/db/rrd/*queues.rrd");
enable_rrd_graphing();
unlink($d_shaperconfdirty_path);
diff --git a/usr/local/www/firewall_shaper_wizards.php b/usr/local/www/firewall_shaper_wizards.php
index 45b7171..ed10eef 100755
--- a/usr/local/www/firewall_shaper_wizards.php
+++ b/usr/local/www/firewall_shaper_wizards.php
@@ -35,6 +35,29 @@ if($_GET['reset'] <> "") {
exit;
}
+if ($_POST['apply']) {
+ write_config();
+
+ $retval = 0;
+ $savemsg = get_std_save_message($retval);
+ /* Setup pf rules since the user may have changed the optimization value */
+
+ config_lock();
+ $retval = filter_configure();
+ config_unlock();
+ if (stristr($retval, "error") <> true)
+ $savemsg = get_std_save_message($retval);
+ else
+ $savemsg = $retval;
+
+ /* reset rrd queues */
+ system("rm -f /var/db/rrd/*queuedrops.rrd");
+ system("rm -f /var/db/rrd/*queues.rrd");
+ enable_rrd_graphing();
+
+ unlink($d_shaperconfdirty_path);
+}
+
$pgtitle = array("Firewall", "Traffic Shaper", "Wizards");
$wizards = array("Single Lan multi Wan" => "traffic_shaper_wizard.xml",
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index 40c1fed..200a8b5 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -511,13 +511,13 @@ elseif((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdata
$t = 0;
foreach ($a_queues as $name => $q) {
$color = "$colorqueuesup[$t]";
- // if($t > 0) { $stack = ":STACK"; }
+ if($t > 0) { $stack = ":STACK"; }
$graphcmd .= "DEF:$name=$rrddbpath$curdatabase:$name:AVERAGE \\
\"CDEF:$name-bytes_out=$name,0,$upstream,LIMIT,UN,0,$name,IF\" \\
\"CDEF:$name-bits_out=$name-bytes_out,8,*\" \\
$AREA:$name-bits_out#${color}:$name \\";
$t++;
- if($t > 7) { $t = 0; }
+ //if($t > 7) { $t = 0; }
}
$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\"`\"";
@@ -545,7 +545,7 @@ elseif((strstr($curdatabase, "-queuedrops.rrd")) && (file_exists("$rrddbpath$cur
\"CDEF:$name-bits_out_neg=$name-bits_out,$multiplier,*\" \\
$AREA:$name-bits_out_neg#${color}:$name \\";
$t++;
- if($t > 7) { $t = 0; }
+ //if($t > 7) { $t = 0; }
}
$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\"`\"";
OpenPOWER on IntegriCloud