mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use iperf3 in diag
This commit is contained in:
parent
338c8865ec
commit
8dfbd211ae
3 changed files with 18 additions and 1 deletions
|
@ -10,10 +10,12 @@ local fs = require "nixio.fs"
|
|||
local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6")
|
||||
local has_traceroute6 = fs.access("/usr/bin/traceroute6")
|
||||
local has_speedtest = fs.access("/usr/sbin/speedtestc")
|
||||
local has_iperf3 = fs.access("/usr/bin/iperf3")
|
||||
|
||||
local dns_host = luci.config.diag and luci.config.diag.dns or "dev.openwrt.org"
|
||||
local ping_host = luci.config.diag and luci.config.diag.ping or "dev.openwrt.org"
|
||||
local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.org"
|
||||
local iperf3_host = luci.config.diag and luci.config.diag.iperf3 or "ping-ams1.online.net"
|
||||
%>
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
|
||||
|
@ -102,13 +104,20 @@ local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.o
|
|||
<input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" />
|
||||
</div>
|
||||
|
||||
<% if has_speedtest then %>
|
||||
<% if has_speedtest and false then %>
|
||||
<div style="width:10%; float:left;">
|
||||
<input style="margin: 5px 0" type="text" value="" name="speedtest" placeholder="alternate server" /><br />
|
||||
<input type="button" value="<%:Speedtest%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.speedtest)" />
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if has_iperf3 then %>
|
||||
<div style="width:10%; float:left;">
|
||||
<input style="margin: 5px 0" type="text" value="<%=iperf3_host%>" name="iperf3" /><br />
|
||||
<input type="button" value="<%:Iperf3%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.iperf3)" />
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<br style="clear:both" /><br />
|
||||
|
||||
</fieldset>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue