X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fview%2Fadmin_network%2Fwifi_overview.htm;h=17afe0d6c243447dd7ef27802a336a6c4268f149;hb=e8349fbfdf5de82ba3f3e9d147c0ddfa31c2293c;hp=312fd08654c900f0ebd7066287ef89182ee96ac5;hpb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;p=project%2Fluci.git diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm index 312fd0865..17afe0d6c 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -1,20 +1,13 @@ <%# -LuCI - Lua Configuration Interface -Copyright 2008-2009 Steven Barth -Copyright 2008-2013 Jo-Philipp Wich - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + Copyright 2008-2009 Steven Barth + Copyright 2008-2015 Jo-Philipp Wich + Licensed to the public under the Apache License 2.0. -%> <%- - local sys = require "luci.sys" - local fs = require "luci.fs" + local ip = require "luci.ip" + local fs = require "nixio.fs" local utl = require "luci.util" local uci = require "luci.model.uci".cursor() local ntm = require "luci.model.network" @@ -86,7 +79,7 @@ You may obtain a copy of the License at return translate("Hermes 802.11b Wireless Controller") -- hostap - elseif name == "wlan" and fs.isdirectory("/proc/net/hostap/" .. ifname) then + elseif name == "wlan" and fs.stat("/proc/net/hostap/" .. ifname, "type") == "dir" then return translate("Prism2/2.5/3 802.11b Wireless Controller") -- dunno yet @@ -97,7 +90,9 @@ You may obtain a copy of the License at local devices = ntm:get_wifidevs() local arpcache = { } - sys.net.arptable(function(e) arpcache[e["HW address"]:upper()] = e["IP address"] end) + ip.neighbors({ family = 4 }, function(n) + if n.mac and n.dest then arpcache[n.mac:upper()] = n.dest:string() end + end) local netlist = { } local netdevs = { } @@ -154,7 +149,7 @@ You may obtain a copy of the License at st.innerHTML = '<%:Wireless is restarting...%>'; } - XHR.get('<%=luci.dispatcher.build_url("admin", "network")%>/wireless_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, null, + XHR.get('<%=url('admin/network')%>/wireless_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, null, function(x) { if (s) @@ -172,7 +167,7 @@ You may obtain a copy of the License at ); } - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "wireless_status", table.concat(netlist, ","))%>', null, + XHR.poll(5, '<%=url('admin/network/wireless_status', table.concat(netlist, ","))%>', null, function(x, st) { if (st) @@ -188,7 +183,7 @@ You may obtain a copy of the License at for( var i = 0; i < st.length; i++ ) { var iw = st[i]; - var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown'); + var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown' && !iw.disabled); var p = iw.quality; var q = is_assoc ? p : -1; @@ -353,7 +348,7 @@ You may obtain a copy of the License at ); //]]> -

<%:Wireless Overview%>

+

<%:Wireless Overview%>