modules/admin-full: slightly change html of diagnostics page
This commit is contained in:
parent
45312520ab
commit
c69c3f01a7
1 changed files with 17 additions and 25 deletions
|
@ -24,23 +24,15 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
var stxhr = new XHR();
|
var stxhr = new XHR();
|
||||||
|
|
||||||
function update_status(field,proto)
|
function update_status(field, proto)
|
||||||
{
|
{
|
||||||
var tool = field.name;
|
var tool = field.name;
|
||||||
var addr = field.value;
|
var addr = field.value;
|
||||||
var protocol = ""
|
var protocol = proto ? "6" : "";
|
||||||
|
|
||||||
var legend = document.getElementById('diag-rc-legend');
|
var legend = document.getElementById('diag-rc-legend');
|
||||||
var output = document.getElementById('diag-rc-output');
|
var output = document.getElementById('diag-rc-output');
|
||||||
|
|
||||||
if (typeof proto != 'undefined') {
|
|
||||||
for(var i = 0; i < proto.length; i++) {
|
|
||||||
if(proto[i].checked) {
|
|
||||||
protocol = proto[i].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (legend && output)
|
if (legend && output)
|
||||||
{
|
{
|
||||||
output.innerHTML =
|
output.innerHTML =
|
||||||
|
@ -80,29 +72,29 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div style="width:30%; float:left">
|
<div style="width:30%; float:left">
|
||||||
<input style="width: 50%" type="text" value="openwrt.org" name="ping" />
|
<input style="margin: 5px 0" type="text" value="openwrt.org" name="ping" /><br />
|
||||||
<input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping,this.form.proto)" />
|
|
||||||
<% if has_ping6 then %>
|
<% if has_ping6 then %>
|
||||||
<div style="width:100%; margin-top: 10px;">
|
<select name="ping_proto" style="width:auto">
|
||||||
<input type="radio" name="proto" value="" checked="checked" /> <%:IPv4%>
|
<option value="" selected="selected"><%:IPv4%></option>
|
||||||
<input type="radio" name="proto" value="6" /> <%:IPv6%>
|
<option value="6"><%:IPv6%></option>
|
||||||
</div>
|
</select>
|
||||||
<%end%>
|
<% end %>
|
||||||
|
<input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping, this.form.ping_proto.selectedIndex)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="width:33%; float:left">
|
<div style="width:33%; float:left">
|
||||||
<input style="width: 50%" type="text" value="openwrt.org" name="traceroute" />
|
<input style="margin: 5px 0" type="text" value="openwrt.org" name="traceroute" /><br />
|
||||||
<input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute,this.form.trproto)" />
|
|
||||||
<% if has_traceroute6 then %>
|
<% if has_traceroute6 then %>
|
||||||
<div style="width:100%; margin-top: 10px;">
|
<select name="traceroute_proto" style="width:auto">
|
||||||
<input type="radio" name="trproto" value="" checked="checked" /> <%:IPv4%>
|
<option value="" selected="selected"><%:IPv4%></option>
|
||||||
<input type="radio" name="trproto" value="6" /> <%:IPv6%>
|
<option value="6"><%:IPv6%></option>
|
||||||
</div>
|
</select>
|
||||||
<%end%>
|
<% end %>
|
||||||
|
<input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute, this.form.traceroute_proto.selectedIndex)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="width:33%; float:left;">
|
<div style="width:33%; float:left;">
|
||||||
<input style="width: 50%" type="text" value="openwrt.org" name="nslookup" />
|
<input style="margin: 5px 0" type="text" value="openwrt.org" name="nslookup" /><br />
|
||||||
<input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" />
|
<input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue