From: Jo-Philipp Wich Date: Mon, 15 Nov 2010 14:41:30 +0000 (+0000) Subject: modules/admin-full: template tweaks X-Git-Tag: 0.10.0~486 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=251088304ebe4862e2749d7615ca3993cbeff24a;p=oweals%2Fluci.git modules/admin-full: template tweaks --- diff --git a/modules/admin-full/luasrc/view/admin_network/iface_status.htm b/modules/admin-full/luasrc/view/admin_network/iface_status.htm index c2790db2c..5836d4145 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_status.htm @@ -4,9 +4,8 @@ var iwxhr = new XHR(); (function() { 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])) { var is_up = (ifc.flags && ifc.flags.up); diff --git a/modules/admin-full/luasrc/view/admin_network/lease_status.htm b/modules/admin-full/luasrc/view/admin_network/lease_status.htm index 3710eb0ed..6f90640cb 100644 --- a/modules/admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/lease_status.htm @@ -2,11 +2,9 @@ var stxhr = new XHR(); (function() { 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'); - if (st && tb) { /* clear all rows */ diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm index 6ed4627dc..af5f5e107 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm @@ -77,7 +77,7 @@ $Id$
- <% for i, net in ipairs(iw.scanlist) do %> + <% for i, net in ipairs(iw.scanlist) do net.encryption = net.encryption or { } %> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm index 3de12d229..0702017de 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -99,9 +99,8 @@ $Id$ (function() { 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) { var assoctable = document.getElementById('iw-assoclist'); diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm index 4b49caefb..e81ff06bd 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm @@ -4,9 +4,8 @@ var iwxhr = new XHR(); (function() { 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])) { var is_assoc = (iw.bssid && iw.channel);
@@ -90,7 +90,7 @@ $Id$ Channel: <%=net.channel%> | Mode: <%=net.mode%> | BSSID: <%=net.bssid%> | - Encryption: <%=format_wifi_encryption(net)%> + Encryption: <%=net.encryption.description or translate("Open")%>
@@ -99,14 +99,16 @@ $Id$ - - <% if net.wpa then %> - - <% for _, v in ipairs(net.auth_suites) do %> - <% end; for _, v in ipairs(net.group_ciphers) do %> - <% end; for _, v in ipairs(net.pair_ciphers) do %> + + <% if net.encryption.wpa then %> + + <% for _, v in ipairs(net.encryption.auth_suites) do %> + <% end; for _, v in ipairs(net.encryption.group_ciphers) do %> + <% end; for _, v in ipairs(net.encryption.pair_ciphers) do %> <% end; end %> + " /> +