mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
(trafficshaper) add burst option to pipes and clean up extra spaces
This commit is contained in:
parent
c63ef62075
commit
0f7cc6f9fe
@ -216,7 +216,7 @@ class SettingsController extends ApiControllerBase
|
||||
$searchPhrase = $this->request->getPost('searchPhrase', 'string', '');
|
||||
|
||||
// create model and fetch query resuls
|
||||
$fields = array("enabled","number", "bandwidth","bandwidthMetric","description","mask","origin");
|
||||
$fields = array("enabled","number", "bandwidth","bandwidthMetric","burst","description","mask","origin");
|
||||
$mdlShaper = new TrafficShaper();
|
||||
$grid = new UIModelGrid($mdlShaper->pipes->pipe);
|
||||
return $grid->fetch($fields, $itemsPerPage, $currentPage, $sortBy, $sortDescending, $searchPhrase);
|
||||
|
||||
@ -16,6 +16,17 @@
|
||||
<label>bandwidth Metric</label>
|
||||
<type>dropdown</type>
|
||||
</field>
|
||||
<field>
|
||||
<id>pipe.burst</id>
|
||||
<label>burst</label>
|
||||
<type>text</type>
|
||||
<help>If the data to be sent exceeds the pipe's bandwidth limit (and
|
||||
the pipe was previously idle), up to size bytes of data are
|
||||
allowed to bypass the dummynet scheduler, and will be sent as
|
||||
fast as the physical link allows.
|
||||
</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>pipe.queue</id>
|
||||
<label>queue</label>
|
||||
|
||||
@ -32,6 +32,10 @@
|
||||
</OptionValues>
|
||||
<ValidationMessage>Bandwidth metric should be one of bit,Kbit,Mbit</ValidationMessage>
|
||||
</bandwidthMetric>
|
||||
<burst type="IntegerField">
|
||||
<Required>N</Required>
|
||||
<ValidationMessage>The burst value is an integer and represent a number of bytes.</ValidationMessage>
|
||||
</burst>
|
||||
<queue type="IntegerField">
|
||||
<Required>N</Required>
|
||||
<MinimumValue>2</MinimumValue>
|
||||
|
||||
@ -114,6 +114,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
<th data-column-id="number" data-type="number" data-visible="false">Number</th>
|
||||
<th data-column-id="bandwidth" data-type="number">Bandwidth</th>
|
||||
<th data-column-id="bandwidthMetric" data-type="string">Metric</th>
|
||||
<th data-column-id="burst" data-type="number">Burst</th>
|
||||
<th data-column-id="mask" data-type="string">Mask</th>
|
||||
<th data-column-id="description" data-type="string">Description</th>
|
||||
<th data-column-id="commands" data-width="7em" data-formatter="commands" data-sortable="false">Commands</th>
|
||||
|
||||
@ -31,10 +31,10 @@ flush
|
||||
#======================================================================================
|
||||
{% if helpers.exists('OPNsense.TrafficShaper.pipes.pipe') %}
|
||||
{% for pipe in helpers.toList('OPNsense.TrafficShaper.pipes.pipe') %}
|
||||
pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/s {%
|
||||
if pipe.queue %} queue {{ pipe.queue }} {%
|
||||
if pipe.queueMetric != 'slots' %} {{pipe.queueMetric}} {% endif %} {% endif
|
||||
%} {% if pipe.mask != 'none' %} mask {{ pipe.mask }} 0xffffffff {% endif %}
|
||||
pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/s{% if pipe.burst %} burst {{ pipe.burst }}{% endif %}{%
|
||||
if pipe.queue %} queue {{ pipe.queue }}{%
|
||||
if pipe.queueMetric != 'slots' %}{{pipe.queueMetric}}{% endif %}{% endif
|
||||
%}{% if pipe.mask != 'none' %} mask {{ pipe.mask }} 0xffffffff {% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user