From f5e511d3fa553583b25ca9624fa4b9ee5a2d8882 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 21 Jul 2010 18:19:11 +0000 Subject: [PATCH] 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. --- etc/inc/shaper.inc | 104 ++++++++++++++++-------------- usr/local/www/firewall_shaper.php | 10 +-- 2 files changed, 59 insertions(+), 55 deletions(-) diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 4961a85d4c..f49f34b343 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -593,19 +593,19 @@ class altq_root_queue { * to the user like the traffic wizard does. */ function build_form() { - $form = "
"; + $form = "
"; $form .= "Enable/Disable"; - $form .= ""; + $form .= "
"; $form .= " GetEnabled() == "on") $form .= " CHECKED"; $form .= " > Enable/disable discipline and its children"; $form .= ""; - $form .= "
Name"; + $form .= "
Name"; $form .= ""; $form .= "".$this->GetQname().""; $form .= ""; - $form .= "Scheduler Type "; + $form .= "Scheduler Type "; $form .= ""; $form .= ""; $form .= "GetBandwidth() . "\">"; @@ -654,15 +654,15 @@ class altq_root_queue { $form .= ">Bit/s"; $form .= ""; $form .= ""; - $form .= "Queue Limit"; + $form .= "Queue Limit"; $form .= ""; $form .= "GetQlimit(); $form .= "\">"; $form .= ""; - $form .= "TBR Size"; + $form .= "TBR Size"; $form .= ""; - $form .= "GetTbrConfig(); $form .= "\">"; $form .= "
"; @@ -1075,38 +1075,40 @@ class priq_queue { * need to update it. */ function build_form() { - $form = "
"; + $form = "
"; $form .= "Enable/Disable"; - $form .= ""; + $form .= "
"; $form .= " GetEnabled() == "on") $form .= " CHECKED"; $form .= " > Enable/Disable queue and its children"; $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= "Queue Name"; $form .= "GetQname()); $form .= "\">"; - $form .= "
Enter the name of the queue here. Do not use spaces and limit the size to 15 characters."; - $form .= ""; + $form .= "
Enter the name of the queue here. Do not use spaces and limit the size to 15 characters."; + $form .= "
"; $form .= ""; - $form .= "Priority"; +/* HFSC actually does not use the priority at all. + $form .= "Priority"; $form .= " GetQpriority()); $form .= "\">"; $form .= "
For hfsc, the range is 0 to 7. The default is 1. Hfsc queues with a higher priority are preferred in the case of overload."; $form .= ""; - $form .= ""; - $form .= "Queue limit"; - $form .= " Queue limit"; + $form .= " GetQlimit()); $form .= "\">"; $form .= "
Queue limit in packets per second."; $form .= ""; $form .= ""; - $form .= "Scheduler options"; + $form .= "Scheduler options"; $form .= ""; $tmpvalue = $this->GetDefault(); if (!empty($tmpvalue)) { @@ -1161,10 +1163,12 @@ class priq_queue { $form .= ""; $form .= "Bandwidth: " . $this->GetBandwidth().$this->GetBwscale(); $form .= ""; +/* HFSC does not need priority. $form .= ""; $tmpvalue = $this->GetQpriority(); if (!empty($tmpvalue)) $form .= "Priority: on "; +*/ $tmpvalue = $this->GetDefault(); if (!empty($tmpvalue)) $form .= "Default: on "; @@ -1793,7 +1797,7 @@ class hfsc_queue extends priq_queue { function build_form() { $form = parent::build_form(); $form .= ""; - $form .= "Bandwidth"; + $form .= "Bandwidth"; $form .= " GetBandwidth()); $form .= "\">"; @@ -1822,7 +1826,7 @@ class hfsc_queue extends priq_queue { $form .= "Choose the amount of bandwidth for this queue"; $form .= ""; $form .= ""; - $form .= "Service Curve (sc)"; + $form .= "Service Curve (sc)"; $form .= ""; $form .= ""; $form .= ""; @@ -2265,8 +2269,9 @@ class cbq_queue extends priq_queue { } function build_form() { - $form = ""; - $form .= ""; + $form = parent::build_form(); + $form .= ""; + $form .= ""; $form .= ""; - $form .= parent::build_form(); $form .= ""; $form .= ""; - $form .= ""; + $form = parent::build_form(); + $form .= ""; + $form .= ""; $form .= ""; - $form .= parent::build_form(); $form .= ""; $form .= "
 
m1
d
m2
Bandwidth
Bandwidth GetBandwidth() > 0) $form .= htmlspecialchars($this->GetBandwidth()); @@ -2295,7 +2300,6 @@ class cbq_queue extends priq_queue { $form .= "
"; $form .= "Choose the amount of bandwidth for this queue"; $form .= "
Scheduler specific optionsGetBorrow() == "on") @@ -2528,8 +2532,9 @@ class fairq_queue extends priq_queue { } function build_form() { - $form = "
Bandwidth
Bandwidth GetBandwidth() > 0) $form .= htmlspecialchars($this->GetBandwidth()); @@ -2558,7 +2563,6 @@ class fairq_queue extends priq_queue { $form .= "
"; $form .= "Choose the amount of bandwidth for this queue"; $form .= "
Scheduler specific options"; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; + $form .= ""; $form .= ""; $form .= ""; - $form .= ""; - $form .= ""; + $form .= "
"; $form .= ""; - $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; + $form .= ""; $form .= ""; $form .= ""; - $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; - $form .= ""; + $form .= ""; $form .= ""; +$output_form .= "
"; $output_form .= ""; -} +} else $output_form .= "";
"; $form .= "
"; + $form = "

"; $form .= "Enable/Disable"; $form .= "
"; $form .= " Enable/Disable limiter and its children"; $form .= "

Name

Name
"; $form .= "GetQname()."\">"; $form .= "
Bandwidth"; + $form .= "
Bandwidth"; $form .= ""; $form .= "GetBandwidth() . "\">"; @@ -2959,7 +2963,7 @@ class dnpipe_class extends dummynet_class { $form .= ">Bit/s"; $form .= ""; $form .= "
Mask
Mask"; $form .= "
Description"; $form .= "GetDescription(); @@ -2999,16 +3003,16 @@ class dnpipe_class extends dummynet_class { $form .= "
Delay"; + $form .= "Delay"; $form .= "GetDelay() . "\">"; $form .= " ms
Hint: in most cases, you "; $form .= "should specify 0 here (or leave the field empty)"; $form .= "
Packet loss rate"; + $form .= "Packet loss rate"; $form .= "GetPlr() . "\">"; $form .= " 
Hint: in most cases, you "; @@ -3016,7 +3020,7 @@ class dnpipe_class extends dummynet_class { $form .= "A value of 0.001 means one packet in 1000 gets dropped"; $form .= "
Queue SizeQueue Size"; $form .= "GetQlimit() . "\">"; @@ -3027,7 +3031,7 @@ class dnpipe_class extends dummynet_class { $form .= "are delivered to their destination."; $form .= "
Bucket SizeBucket Size"; $form .= "GetBuckets() . "\">"; @@ -3166,7 +3170,7 @@ class dnqueue_class extends dummynet_class { } function build_form() { - $form = "

"; + $form = "

"; $form .= "Enable/Disable"; $form .= "
"; $form .= " Enable/Disable queue and its children"; $form .= "

Name

Name
"; $form .= "GetQname()."\">"; $form .= "
Mask
Mask"; $form .= "
Description"; $form .= "GetDescription(); @@ -3218,16 +3222,16 @@ class dnqueue_class extends dummynet_class { $form .= " value=\"Show advanced options\">"; $form .= "
Weight"; + $form .= "Weight"; $form .= "GetWeight() . "\">"; $form .= " ms
Hint: For queues under the same parent "; $form .= "this specifies the share that a queue gets(values range from 1 to 100, you can leave it blank otherwise)"; $form .= "
Packet loss rate"; + $form .= "Packet loss rate"; $form .= "GetPlr() . "\">"; $form .= " 
Hint: in most cases, you "; @@ -3235,7 +3239,7 @@ class dnqueue_class extends dummynet_class { $form .= "A value of 0.001 means one packet in 1000 gets dropped"; $form .= "
Queue SizeQueue Size"; $form .= "GetQlimit() . "\">"; @@ -3246,7 +3250,7 @@ class dnqueue_class extends dummynet_class { $form .= "are delivered to their destination."; $form .= "
Bucket SizeBucket Size"; $form .= "GetBuckets() . "\">"; @@ -3384,7 +3388,7 @@ class layer7 { } function build_form() { - $form = "

"; + $form = "

"; $form .= "Enable/Disable"; $form .= "
"; $form .= " Enable/Disable layer7 Container"; $form .= "

Name

Name
"; $form .= "GetRName()."\">"; $form .= "
Description
Description"; $form .= "GetRDescription(); diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php index 6618389087..e456c6194e 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 .= "