diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-01-04 19:55:50 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-01-04 19:55:50 +0000 |
commit | c69c3f01a7bbcad542c6e6cc6c389f67f8b10cb7 (patch) | |
tree | 5fddb2a11b178e589395e6b62e441ab03fab7124 /modules/admin-full | |
parent | 45312520ab348ec58d0808b0c335c996e0df3a9d (diff) |
modules/admin-full: slightly change html of diagnostics page
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/view/admin_network/diagnostics.htm | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/diagnostics.htm b/modules/admin-full/luasrc/view/admin_network/diagnostics.htm index 64666880d..48825629c 100644 --- a/modules/admin-full/luasrc/view/admin_network/diagnostics.htm +++ b/modules/admin-full/luasrc/view/admin_network/diagnostics.htm @@ -24,23 +24,15 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6") <script type="text/javascript">//<![CDATA[ var stxhr = new XHR(); - function update_status(field,proto) + function update_status(field, proto) { var tool = field.name; var addr = field.value; - var protocol = "" + var protocol = proto ? "6" : ""; var legend = document.getElementById('diag-rc-legend'); 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) { output.innerHTML = @@ -80,29 +72,29 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6") <br /> <div style="width:30%; float:left"> - <input style="width: 50%" type="text" value="openwrt.org" name="ping" /> - <input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping,this.form.proto)" /> + <input style="margin: 5px 0" type="text" value="openwrt.org" name="ping" /><br /> <% if has_ping6 then %> - <div style="width:100%; margin-top: 10px;"> - <input type="radio" name="proto" value="" checked="checked" /> <%:IPv4%> - <input type="radio" name="proto" value="6" /> <%:IPv6%> - </div> - <%end%> + <select name="ping_proto" style="width:auto"> + <option value="" selected="selected"><%:IPv4%></option> + <option value="6"><%:IPv6%></option> + </select> + <% 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 style="width:33%; float:left"> - <input style="width: 50%" type="text" value="openwrt.org" name="traceroute" /> - <input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute,this.form.trproto)" /> + <input style="margin: 5px 0" type="text" value="openwrt.org" name="traceroute" /><br /> <% if has_traceroute6 then %> - <div style="width:100%; margin-top: 10px;"> - <input type="radio" name="trproto" value="" checked="checked" /> <%:IPv4%> - <input type="radio" name="trproto" value="6" /> <%:IPv6%> - </div> - <%end%> + <select name="traceroute_proto" style="width:auto"> + <option value="" selected="selected"><%:IPv4%></option> + <option value="6"><%:IPv6%></option> + </select> + <% 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 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)" /> </div> |