modules/admin-full: template tweaks
This commit is contained in:
parent
bb1af307f7
commit
251088304e
5 changed files with 14 additions and 17 deletions
|
@ -4,9 +4,8 @@
|
||||||
var iwxhr = new XHR();
|
var iwxhr = new XHR();
|
||||||
(function() {
|
(function() {
|
||||||
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null,
|
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null,
|
||||||
function(x)
|
function(x, ifc)
|
||||||
{
|
{
|
||||||
var ifc = x.responseText ? eval('(' + x.responseText + ')') : { };
|
|
||||||
if (ifc && (ifc = ifc[0]))
|
if (ifc && (ifc = ifc[0]))
|
||||||
{
|
{
|
||||||
var is_up = (ifc.flags && ifc.flags.up);
|
var is_up = (ifc.flags && ifc.flags.up);
|
||||||
|
|
|
@ -2,11 +2,9 @@
|
||||||
var stxhr = new XHR();
|
var stxhr = new XHR();
|
||||||
(function() {
|
(function() {
|
||||||
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null,
|
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null,
|
||||||
function(x)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var st = x.responseText ? eval('(' + x.responseText + ')') : null;
|
|
||||||
var tb = document.getElementById('lease_status_table');
|
var tb = document.getElementById('lease_status_table');
|
||||||
|
|
||||||
if (st && tb)
|
if (st && tb)
|
||||||
{
|
{
|
||||||
/* clear all rows */
|
/* clear all rows */
|
||||||
|
|
|
@ -77,7 +77,7 @@ $Id$
|
||||||
<fieldset class="cbi-section">
|
<fieldset class="cbi-section">
|
||||||
<table class="cbi-section-table" style="empty-cells:hide">
|
<table class="cbi-section-table" style="empty-cells:hide">
|
||||||
<!-- scan list -->
|
<!-- scan list -->
|
||||||
<% for i, net in ipairs(iw.scanlist) do %>
|
<% for i, net in ipairs(iw.scanlist) do net.encryption = net.encryption or { } %>
|
||||||
<tr class="cbi-section-table-row cbi-rowstyle-<%=1 + ((i-1) % 2)%>">
|
<tr class="cbi-section-table-row cbi-rowstyle-<%=1 + ((i-1) % 2)%>">
|
||||||
<td class="cbi-value-field" style="width:16px; padding:3px">
|
<td class="cbi-value-field" style="width:16px; padding:3px">
|
||||||
<abbr title="Signal: <%=net.signal%> dB / Quality: <%=net.quality%>/<%=net.quality_max%>">
|
<abbr title="Signal: <%=net.signal%> dB / Quality: <%=net.quality%>/<%=net.quality_max%>">
|
||||||
|
@ -90,7 +90,7 @@ $Id$
|
||||||
<strong>Channel:</strong> <%=net.channel%> |
|
<strong>Channel:</strong> <%=net.channel%> |
|
||||||
<strong>Mode:</strong> <%=net.mode%> |
|
<strong>Mode:</strong> <%=net.mode%> |
|
||||||
<strong>BSSID:</strong> <%=net.bssid%> |
|
<strong>BSSID:</strong> <%=net.bssid%> |
|
||||||
<strong>Encryption:</strong> <%=format_wifi_encryption(net)%>
|
<strong>Encryption:</strong> <%=net.encryption.description or translate("Open")%>
|
||||||
</td>
|
</td>
|
||||||
<td class="cbi-value-field" style="width:40px">
|
<td class="cbi-value-field" style="width:40px">
|
||||||
<form action="<%=REQUEST_URI%>" method="post">
|
<form action="<%=REQUEST_URI%>" method="post">
|
||||||
|
@ -99,14 +99,16 @@ $Id$
|
||||||
<input type="hidden" name="mode" value="<%=net.mode%>" />
|
<input type="hidden" name="mode" value="<%=net.mode%>" />
|
||||||
<input type="hidden" name="bssid" value="<%=net.bssid%>" />
|
<input type="hidden" name="bssid" value="<%=net.bssid%>" />
|
||||||
<input type="hidden" name="channel" value="<%=net.channel%>" />
|
<input type="hidden" name="channel" value="<%=net.channel%>" />
|
||||||
<input type="hidden" name="wep" value="<%=net.wep and 1 or 0%>" />
|
<input type="hidden" name="wep" value="<%=net.encryption.wep and 1 or 0%>" />
|
||||||
<% if net.wpa then %>
|
<% if net.encryption.wpa then %>
|
||||||
<input type="hidden" name="wpa_version" value="<%=net.wpa%>" />
|
<input type="hidden" name="wpa_version" value="<%=net.encryption.wpa%>" />
|
||||||
<% for _, v in ipairs(net.auth_suites) do %><input type="hidden" name="wpa_suites" value="<%=v%>" />
|
<% for _, v in ipairs(net.encryption.auth_suites) do %><input type="hidden" name="wpa_suites" value="<%=v%>" />
|
||||||
<% end; for _, v in ipairs(net.group_ciphers) do %><input type="hidden" name="wpa_group" value="<%=v%>" />
|
<% end; for _, v in ipairs(net.encryption.group_ciphers) do %><input type="hidden" name="wpa_group" value="<%=v%>" />
|
||||||
<% end; for _, v in ipairs(net.pair_ciphers) do %><input type="hidden" name="wpa_pairwise" value="<%=v%>" />
|
<% end; for _, v in ipairs(net.encryption.pair_ciphers) do %><input type="hidden" name="wpa_pairwise" value="<%=v%>" />
|
||||||
<% end; end %>
|
<% end; end %>
|
||||||
|
|
||||||
|
<input type="hidden" name="clbridge" value="<%=iw.type == "wl" and 1 or 0%>" />
|
||||||
|
|
||||||
<input class="cbi-button-apply" type="submit" value="Join Network" />
|
<input class="cbi-button-apply" type="submit" value="Join Network" />
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -99,9 +99,8 @@ $Id$
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", table.concat(netlist, ","))%>', null,
|
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", table.concat(netlist, ","))%>', null,
|
||||||
function(x)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var st = x.responseText ? eval('(' + x.responseText + ')') : null;
|
|
||||||
if (st)
|
if (st)
|
||||||
{
|
{
|
||||||
var assoctable = document.getElementById('iw-assoclist');
|
var assoctable = document.getElementById('iw-assoclist');
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
var iwxhr = new XHR();
|
var iwxhr = new XHR();
|
||||||
(function() {
|
(function() {
|
||||||
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null,
|
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null,
|
||||||
function(x)
|
function(x, iw)
|
||||||
{
|
{
|
||||||
var iw = x.responseText ? eval('(' + x.responseText + ')') : null;
|
|
||||||
if (iw && (iw = iw[0]))
|
if (iw && (iw = iw[0]))
|
||||||
{
|
{
|
||||||
var is_assoc = (iw.bssid && iw.channel);
|
var is_assoc = (iw.bssid && iw.channel);
|
||||||
|
|
Loading…
Reference in a new issue