mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update iperf interface
This commit is contained in:
parent
a95c150d8f
commit
18d4ac663d
2 changed files with 52 additions and 18 deletions
|
@ -8,12 +8,12 @@
|
|||
<script type="text/javascript">//<![CDATA[
|
||||
var stxhr = new XHR();
|
||||
|
||||
function update_speed(field, proto, mode)
|
||||
function update_speed(field, proto, mode,omit,parallel,transmit,bitrate)
|
||||
{
|
||||
update_upload(field,proto,mode);
|
||||
update_upload(field,proto,mode,omit,parallel,transmit,bitrate);
|
||||
}
|
||||
|
||||
function update_upload(field, proto, mode)
|
||||
function update_upload(field, proto, mode,omit,parallel,transmit,bitrate)
|
||||
{
|
||||
var tool = field.name;
|
||||
var addr = field.value;
|
||||
|
@ -27,7 +27,7 @@
|
|||
'<%:Waiting for command to complete...%>'
|
||||
;
|
||||
|
||||
stxhr.post('<%=url('admin/services/iperf')%>/run_test' + '/' + addr + '/' + proto + '/' + mode + '/upload', { token: '<%=token%>' },
|
||||
stxhr.post('<%=url('admin/services/iperf')%>/run_test' + '/' + addr + '/' + proto + '/' + mode + '/upload' + '/' + omit + '/' + parallel + '/' + transmit + '/' + bitrate, { token: '<%=token%>' },
|
||||
function(x)
|
||||
{
|
||||
if (x.responseText)
|
||||
|
@ -47,13 +47,13 @@
|
|||
{
|
||||
upload.innerHTML = '<%:Upload%> - <span class="error"><%:Bad address specified!%></span>';
|
||||
}
|
||||
update_download(field,proto,mode);
|
||||
update_download(field,proto,mode,omit,parallel,transmit,bitrate);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function update_download(field, proto, mode)
|
||||
function update_download(field, proto, mode,omit,parallel,transmit,bitrate)
|
||||
{
|
||||
var tool = field.name;
|
||||
var addr = field.value;
|
||||
|
@ -67,7 +67,7 @@
|
|||
'<%:Waiting for command to complete...%>'
|
||||
;
|
||||
|
||||
stxhr.post('<%=url('admin/services/iperf')%>/run_test' + '/' + addr + '/' + proto + '/' + mode + '/download', { token: '<%=token%>' },
|
||||
stxhr.post('<%=url('admin/services/iperf')%>/run_test' + '/' + addr + '/' + proto + '/' + mode + '/download' + '/' + omit + '/' + parallel + '/' + transmit + '/' + bitrate, { token: '<%=token%>' },
|
||||
function(x)
|
||||
{
|
||||
if (x.responseText)
|
||||
|
@ -96,8 +96,8 @@
|
|||
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
|
||||
<form class="inline" method="post" action="<%=url('admin/services/iperf/run_test')%>">
|
||||
<div class="cbi-map">
|
||||
<h2 name="content"><%:iperf Speed tests%></h2>
|
||||
<div class="cbi-map-descr"><%:This iperf interface is in bêta. No support for this.%></div>
|
||||
<h2 name="content"><%:iPerf speed tests%></h2>
|
||||
<div class="cbi-map-descr"><%:This iPerf interface is in bêta. No support for this.%></div>
|
||||
<fieldset class="cbi-section" id="networks">
|
||||
<legend><%:Settings%></legend>
|
||||
<div class="cbi-section-descr"></div>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<div class="cbi-value-field">
|
||||
<select class="cbi-input-select" name="mode">
|
||||
<option value="tcp">TCP</option>
|
||||
<!-- <option value="udp">UDP</option> -->
|
||||
<option value="udp">UDP</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -119,6 +119,34 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Target bitrate (Mbits/s)%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="bitrate" data-type="uinteger" type="text" class="cbi-input-text" value="0"/>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:0 for unlimited. Need to be limited for UDP test%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Number of parallel client streams to run%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="parallel" data-type="uinteger" type="text" class="cbi-input-text" value="1"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Omit the first n seconds%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="omit" data-type="uinteger" type="text" class="cbi-input-text" value="3"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Time to transmit for (s)%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="transmit" data-type="uinteger" type="text" class="cbi-input-text" value="5"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Server%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
@ -134,7 +162,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input type="button" value="<%:Test%>" class="cbi-button cbi-button-apply" onclick="update_speed(this.form.addr,this.form.proto.value,this.form.mode.value)" />
|
||||
<input type="button" value="<%:Test%>" class="cbi-button cbi-button-apply" onclick="update_speed(this.form.addr,this.form.proto.value,this.form.mode.value,this.form.omit.value,this.form.parallel.value,this.form.transmit.value,this.form.bitrate.value)" />
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue