Huuuuuuuuuuuge rewrite of the Wireless Configuration
authorSteven Barth <steven@midlink.org>
Mon, 18 Aug 2008 00:38:18 +0000 (00:38 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 18 Aug 2008 00:38:18 +0000 (00:38 +0000)
15 files changed:
i18n/english/luasrc/i18n/admin-core.en.lua
i18n/english/luasrc/i18n/default.en.lua
i18n/german/luasrc/i18n/admin-core.de.lua
i18n/german/luasrc/i18n/default.de.lua
libs/cbi/luasrc/view/cbi/button.htm
libs/cbi/luasrc/view/cbi/nullsection.htm
libs/cbi/luasrc/view/cbi/tblsection.htm
libs/sys/luasrc/sys.lua
modules/admin-full/luasrc/controller/admin/network.lua
modules/admin-full/luasrc/controller/admin/wifi.lua [deleted file]
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_network/wireless.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua [deleted file]
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua [deleted file]
modules/admin-full/luasrc/view/admin_wifi/index.htm [deleted file]

index 4a47e4f1d70594d24401011465e0f84f3cebb00a..c3552f069c0399d79a53ddc28ad6ca54f0944754 100644 (file)
@@ -287,4 +287,6 @@ a_w_tlsprivkey = "Path to Private Key"
 a_w_tlsprivkeypwd = "Password of Private Key"
 a_w_peapauth = "PEAP-Authentication"
 a_w_peapidentity = "PEAP-Identity"
-a_w_peappassword = "PEAP-Password"
\ No newline at end of file
+a_w_peappassword = "PEAP-Password"
+
+a_w_create = "Create Network"
\ No newline at end of file
index 6a57073b5b832bfc306bd017937731c8c599d468..f57da7f35cb8522913ac67f816a97e69401176db 100644 (file)
@@ -70,6 +70,7 @@ reset = [[Reset]]
 revert = [[Revert]]
 save = [[Save]]
 saveapply = [[Save &amp; Apply]]
+scan = [[Scan]]
 service = [[Service]]
 services = [[Services]]
 settings = [[Settings]]
index c71dfc1de1abdd477ac4ffd3b68a0b43feddeecb..db989047e7b975e98bcfebe1589172d0f5cc23ef 100644 (file)
@@ -362,4 +362,6 @@ a_w_tlsprivkey = "Pfad zum Privaten Schlüssel"
 a_w_tlsprivkeypwd = "Passwort des Privaten Schlüssels"
 a_w_peapauth = "PEAP-Authentifizierung"
 a_w_peapidentity = "PEAP-Identitäz"
-a_w_peappassword = "PEAP-Passwort"
\ No newline at end of file
+a_w_peappassword = "PEAP-Passwort"
+
+a_w_create = "Netzwerk anlegen"
\ No newline at end of file
index 078c1e8d3109beb083379296cad5a20ad4bc6249..bff0203e6e35f6053634ac386c693d9f5f68ba84 100644 (file)
@@ -88,6 +88,7 @@ revert = "Verwerfen"
 
 save = "Speichern"
 saveapply = "Speichern & Anwenden"
+scan = "Scan"
 service = "Dienst"
 services = "Dienste"
 settings = "Einstellungen"
index 2d740f45c0978f9c17737b697329a7550261e6eb..c2a0d437e8ed31b4badbb9540adbdb90267bb555 100644 (file)
@@ -13,5 +13,9 @@ $Id$
 
 -%>
 <%+cbi/valueheader%>
-       <input<% if self.inputstyle then %> class="cbi-input-<%=self.inputstyle%>"<% end %> type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title) %> />
+       <% if self:cfgvalue(section) ~= false then %>
+               <input<% if self.inputstyle then %> class="cbi-input-<%=self.inputstyle%>"<% end %> type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title)%> />
+       <% else %>
+               -
+       <% end %>
 <%+cbi/valuefooter%>
index b01a6a9f583d725674990e3f200b02a3404b4195..476db96d87137b5fac1753304d6218fa98936bbe 100644 (file)
@@ -13,6 +13,9 @@ $Id$
 
 -%>
                <fieldset class="cbi-section">
+                       <% if self.title and #self.title > 0 then -%>
+                               <legend><%=self.title%></legend>
+                       <%- end %>
                        <div class="cbi-section-node">
                                <% self:render_children(1, scope or {}) %>
                        </div>
index d03d6f49714b7649ea270d23a8bcc42d9c66019a..66de5aeb2a13272b32c6a21ba589e09acdcd5b3c 100644 (file)
@@ -76,7 +76,13 @@ end
                                <%- if self.extedit or self.addremove then -%>
                                        <td class="cbi-section-table-cell">
                                                <%- if self.extedit then -%>
-                                                       <a href="<%=self.extedit:format(section)%>" title="<%:edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:edit%>" /></a>
+                                                       <a href="
+                                                       <%- if type(self.extedit) == "string" then -%>
+                                                               <%=self.extedit:format(section)%>
+                                                       <%- elseif type(self.extedit) == "function" then -%>
+                                                               <%=self:extedit(section)%>
+                                                       <%- end -%>
+                                                       " title="<%:edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:edit%>" /></a>
                                                <%- end; if self.addremove then %>
                                                        <input type="image" value="<%:cbi_del%>" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" />
                                                <%- end -%>
index 970dcffaaa5b27ed17fe722c75da2a6e5f380126..d0dc5acbd879a9ffda17e55763b361388555fbd8 100644 (file)
@@ -432,8 +432,9 @@ end
 
 --- Get iwlist scan output from all wireless devices.
 -- @return     Table of tables contaiing all scan results
-function wifi.iwscan()
-       local cnt = luci.util.exec("iwlist scan 2>/dev/null")
+function wifi.iwscan(iface)
+       local siface = iface or ""
+       local cnt = luci.util.exec("iwlist "..siface.." scan 2>/dev/null")
        local iws = {}
 
        for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do
@@ -451,7 +452,7 @@ function wifi.iwscan()
                end
        end
 
-       return iws
+       return iface and (iws[iface] or {}) or iws
 end
 
 
index 3952fb868b044deaa55fd8a2cb9fcf48e6372a19..23a575852b66e77c491a6534b5e4a05372cd27db 100644 (file)
@@ -28,6 +28,23 @@ function index()
        page.title  = i18n("a_n_switch")
        page.order  = 20
        
+       local page  = node("admin", "network", "wireless")
+       page.target = form("admin_network/wireless")
+       page.title  = i18n("wifi")
+       page.order  = 15
+       luci.model.uci.foreach("wireless", "wifi-device",
+               function (section)
+                       local ifc = section[".name"]
+                               entry({"admin", "network", "wireless", ifc},
+                                alias("admin", "network", "wifi", ifc),
+                                ifc:upper())
+               end
+       )
+       
+       local page  = node("admin", "network", "wifi")
+       page.target = cbi("admin_network/wifi")
+       page.leaf   = true
+       
        local page  = node("admin", "network", "network")
        page.target = cbi("admin_network/network")
        page.title  = i18n("interfaces", "Schnittstellen")
diff --git a/modules/admin-full/luasrc/controller/admin/wifi.lua b/modules/admin-full/luasrc/controller/admin/wifi.lua
deleted file mode 100644 (file)
index 4bef0b7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-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
-
-$Id$
-]]--
-module("luci.controller.admin.wifi", package.seeall)
-
-function index()
-       luci.i18n.loadc("admin-core")
-       local i18n = luci.i18n.translate
-
-       local page  = node("admin", "wifi")
-       page.target = template("admin_wifi/index")
-       page.title  = i18n("wifi", "Drahtlos")  
-       page.order  = 60
-       
-       local page  = node("admin", "wifi", "devices")
-       page.target = cbi("admin_wifi/devices")
-       page.title  = i18n("devices", "Geräte")
-       page.order  = 10
-       
-       local page  = node("admin", "wifi", "networks")
-       page.target = cbi("admin_wifi/networks")
-       page.title  = i18n("networks", "Netze")
-       page.order  = 20
-end
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
new file mode 100644 (file)
index 0000000..64a4928
--- /dev/null
@@ -0,0 +1,163 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+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
+
+$Id$
+]]--
+require("luci.tools.webadmin")
+arg[1] = arg[1] or ""
+
+m = Map("wireless", translate("networks"), translate("a_w_networks1"))
+
+s = m:section(NamedSection, arg[1], "wifi-device", translate("device") .. " " .. arg[1])
+--s.addremove = true
+
+en = s:option(Flag, "disabled", translate("enable"))
+en.enabled = "0"
+en.disabled = "1"
+
+function en.cfgvalue(self, section)
+       return Flag.cfgvalue(self, section) or "0"
+end
+
+t = s:option(DummyValue, "type", translate("type"))
+
+mode = s:option(ListValue, "mode", translate("mode"))
+mode:value("", "standard")
+mode:value("11b", "802.11b")
+mode:value("11g", "802.11g")
+mode:value("11a", "802.11a")
+mode:value("11bg", "802.11b+g")
+mode.rmempty = true
+
+s:option(Value, "channel", translate("a_w_channel"))
+
+s:option(Value, "txantenna", translate("a_w_txantenna")).optional = true
+
+s:option(Value, "rxantenna", translate("a_w_rxantenna")).optional = true
+
+s:option(Value, "distance", translate("distance"),
+       translate("a_w_distance1")).optional = true
+
+s:option(Value, "diversity", translate("a_w_diversity")):depends("type", "atheros")
+       
+country = s:option(Value, "country", translate("a_w_countrycode"))
+country.optional = true
+country:depends("type", "broadcom")
+
+maxassoc = s:option(Value, "maxassoc", translate("a_w_connlimit"))
+maxassoc:depends("type", "broadcom")
+maxassoc.optional = true
+
+
+
+s = m:section(TypedSection, "wifi-iface", translate("interfaces"))
+s.addremove = true
+s.anonymous = true
+s:depends("device", arg[1])
+s.defaults.device = arg[1]
+
+s:option(Value, "ssid", translate("a_w_netid")).maxlength = 32
+
+network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
+network:value("")
+luci.tools.webadmin.cbi_add_networks(network)
+
+mode = s:option(ListValue, "mode", translate("mode"))
+mode:value("ap", translate("a_w_ap"))
+mode:value("adhoc", translate("a_w_adhoc"))
+mode:value("ahdemo", translate("a_w_ahdemo"))
+mode:value("sta", translate("a_w_client"))
+mode:value("wds", translate("a_w_wds"))
+mode:value("monitor", translate("a_w_monitor"))
+
+s:option(Value, "bssid", "BSSID").optional = true
+
+s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true
+
+s:option(Flag, "frameburst", translate("a_w_brcmburst")).optional = true
+s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
+
+
+encr = s:option(ListValue, "encryption", translate("encryption"))
+encr:value("none", "keine")
+encr:value("wep", "WEP")
+encr:value("PSK", "WPA-PSK")
+encr:value("WPA", "WPA-EAP", {mode="ap"}, {mode="sta"})
+encr:value("PSK2", "WPA2-PSK")
+encr:value("WPA2", "WPA2-EAP", {mode="ap"}, {mode="sta"})
+encr:depends("mode", "ap")
+encr:depends("mode", "sta")
+encr:depends("mode", "wds")
+
+server = s:option(Value, "server", translate("a_w_radiussrv"))
+server:depends({mode="ap", encryption="WPA"})
+server:depends({mode="ap", encryption="WPA2"})
+server.rmempty = true
+
+port = s:option(Value, "port", translate("a_w_radiusport"))
+port:depends({mode="ap", encryption="WPA"})
+port:depends({mode="ap", encryption="WPA2"})
+port.rmempty = true
+
+key = s:option(Value, "key", translate("key"))
+key:depends("encryption", "wep")
+key:depends("encryption", "PSK")
+key:depends({mode="ap", encryption="WPA"})
+key:depends("encryption", "PSK2")
+key:depends({mode="ap", encryption="WPA2"})
+key.rmempty = true
+
+nasid = s:option(Value, "nasid", translate("a_w_nasid"))
+nasid:depends({mode="ap", encryption="WPA"})
+nasid:depends({mode="ap", encryption="WPA2"})
+nasid.rmempty = true
+
+eaptype = s:option(ListValue, "eap_type", translate("a_w_eaptype"))
+eaptype:value("TLS")
+eaptype:value("PEAP")
+eaptype:depends({mode="sta", encryption="WPA"})
+eaptype:depends({mode="sta", encryption="WPA2"})
+
+cacert = s:option(Value, "ca_cert", translate("a_w_cacert"))
+cacert:depends({mode="sta", encryption="WPA"})
+cacert:depends({mode="sta", encryption="WPA2"})
+
+privkey = s:option(Value, "priv_key", translate("a_w_tlsprivkey"))
+privkey:depends({mode="sta", eap_type="TLS", encryption="WPA2"})
+privkey:depends({mode="sta", eap_type="TLS", encryption="WPA"})
+
+privkeypwd = s:option(Value, "priv_key_pwd", translate("a_w_tlsprivkeypwd"))
+privkeypwd:depends({mode="sta", eap_type="TLS", encryption="WPA2"})
+privkeypwd:depends({mode="sta", eap_type="TLS", encryption="WPA"})
+
+
+auth = s:option(Value, "auth", translate("a_w_peapauth"))
+auth:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
+auth:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
+
+identity = s:option(Value, "identity", translate("a_w_peapidentity"))
+identity:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
+identity:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
+
+password = s:option(Value, "password", translate("a_w_peappassword"))
+password:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
+password:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
+
+
+
+
+s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")).optional = true
+
+s:option(Flag, "hidden", translate("a_w_hideessid")).optional = true
+
+
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wireless.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wireless.lua
new file mode 100644 (file)
index 0000000..ae24628
--- /dev/null
@@ -0,0 +1,135 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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
+
+$Id$
+]]--
+require("luci.sys")
+require("luci.tools.webadmin")
+
+luci.model.uci.load_state("wireless")
+local wireless = luci.model.uci.get_all("wireless")
+luci.model.uci.unload("wireless")
+
+local wifidata = luci.sys.wifi.getiwconfig()
+local ifaces = {}
+
+for k, v in pairs(wireless) do
+       if v[".type"] == "wifi-iface" then
+               table.insert(ifaces, v)
+       end
+end
+
+
+m = SimpleForm("wireless", translate("wifi"))
+
+s = m:section(Table, ifaces, translate("networks"))
+
+function s.extedit(self, section) 
+       local device = self.map:get(section, "device") or ""
+       return luci.http.getenv("REQUEST_URI") .. "/" .. device
+end
+
+link = s:option(DummyValue, "_link", translate("link"))
+function link.cfgvalue(self, section)
+       local ifname = self.map:get(section, "ifname")
+       return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-"
+end
+
+essid = s:option(DummyValue, "ssid", "ESSID")
+
+bssid = s:option(DummyValue, "_bsiid", "BSSID")
+function bssid.cfgvalue(self, section)
+       local ifname = self.map:get(section, "ifname")
+       return (wifidata[ifname] and (wifidata[ifname].Cell 
+        or wifidata[ifname]["Access Point"])) or "-"
+end
+
+channel = s:option(DummyValue, "channel", translate("channel"))
+function channel.cfgvalue(self, section)
+       return wireless[self.map:get(section, "device")].channel
+end
+
+protocol = s:option(DummyValue, "_mode", translate("protocol"))
+function protocol.cfgvalue(self, section)
+       return "802." .. wireless[self.map:get(section, "device")].mode
+end
+
+mode = s:option(DummyValue, "mode", translate("mode"))
+encryption = s:option(DummyValue, "encryption", translate("iwscan_encr"))
+
+power = s:option(DummyValue, "_power", translate("power"))
+function power.cfgvalue(self, section)
+       local ifname = self.map:get(section, "ifname")
+       return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-"
+end
+
+scan = s:option(Button, "_scan", translate("scan"))
+scan.inputstyle = "find"
+
+function scan.cfgvalue(self, section)
+       return self.map:get(section, "ifname") or false
+end
+
+t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1"))
+
+function scan.write(self, section)
+       t2.render = t2._render
+       local ifname = self.map:get(section, "ifname")
+       luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname))
+end
+
+t2._render = t2.render
+t2.render = function() end
+
+t2:option(DummyValue, "Quality", translate("iwscan_link"))
+essid = t2:option(DummyValue, "ESSID", "ESSID")
+function essid.cfgvalue(self, section)
+       return luci.util.pcdata(self.map:get(section, "ESSID"))
+end
+
+t2:option(DummyValue, "Address", "BSSID")
+t2:option(DummyValue, "Mode", translate("mode"))
+chan = t2:option(DummyValue, "channel", translate("channel"))
+function chan.cfgvalue(self, section)
+       return self.map:get(section, "Channel")
+           or self.map:get(section, "Frequency")
+           or "-"
+end 
+
+t2:option(DummyValue, "Encryption key", translate("iwscan_encr"))
+
+t2:option(DummyValue, "Signal level", translate("iwscan_signal"))
+
+t2:option(DummyValue, "Noise level", translate("iwscan_noise"))
+
+
+s2 = m:section(SimpleSection, translate("a_w_create"))
+create = s2:option(ListValue, "create", translate("device"))
+create:value("", translate("cbi_select"))
+for k, v in pairs(wireless) do
+       if v[".type"] == "wifi-device" then
+               create:value(k)
+       end
+end
+
+function create.write(self, section, value)
+       luci.model.uci.load_config("wireless")
+       luci.model.uci.section("wireless", "wifi-iface", nil, {device=value})
+       luci.model.uci.save_config("wireless")
+       luci.http.redirect(luci.http.getenv("REQUEST_URI") .. "/" .. value)
+end
+
+function create.cbid(self, section)
+       return "priv.cbid.create"
+end
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
deleted file mode 100644 (file)
index e33f241..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-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
-
-$Id$
-]]--
-m = Map("wireless", translate("devices"), translate("a_w_devices1", 
-       "An dieser Stelle können eingebaute WLAN-Geräte konfiguriert werden."))
-
-s = m:section(TypedSection, "wifi-device", "")
---s.addremove = true
-
-en = s:option(Flag, "disabled", translate("enable"))
-en.enabled = "0"
-en.disabled = "1"
-
-function en.cfgvalue(self, section)
-       return Flag.cfgvalue(self, section) or "0"
-end
-
-t = s:option(DummyValue, "type", translate("type"))
-
-mode = s:option(ListValue, "mode", translate("mode"))
-mode:value("", "standard")
-mode:value("11b", "802.11b")
-mode:value("11g", "802.11g")
-mode:value("11a", "802.11a")
-mode:value("11bg", "802.11b+g")
-mode.rmempty = true
-
-s:option(Value, "channel", translate("a_w_channel"))
-
-s:option(Value, "txantenna", translate("a_w_txantenna")).rmempty = true
-
-s:option(Value, "rxantenna", translate("a_w_rxantenna")).rmempty = true
-
-s:option(Value, "distance", translate("distance"),
-       translate("a_w_distance1")).rmempty = true
-
-s:option(Value, "diversity", translate("a_w_diversity")):depends("type", "atheros")
-       
-country = s:option(Value, "country", translate("a_w_countrycode"))
-country.optional = true
-country:depends("type", "broadcom")
-
-maxassoc = s:option(Value, "maxassoc", translate("a_w_connlimit"))
-maxassoc:depends("type", "broadcom")
-maxassoc.optional = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
deleted file mode 100644 (file)
index a109587..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-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
-
-$Id$
-]]--
-require("luci.tools.webadmin")
-m = Map("wireless", translate("networks"), translate("a_w_networks1"))
-
-s = m:section(TypedSection, "wifi-iface", "")
-s.addremove = true
-s.anonymous = true
-
-s:option(Value, "ssid", translate("a_w_netid")).maxlength = 32
-
-device = s:option(ListValue, "device", translate("device"))
-luci.model.uci.foreach("wireless", "wifi-device",
-       function (section)
-               device:value(section[".name"])
-       end)
-
-network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
-network:value("")
-luci.tools.webadmin.cbi_add_networks(network)
-
-mode = s:option(ListValue, "mode", translate("mode"))
-mode:value("ap", translate("a_w_ap"))
-mode:value("adhoc", translate("a_w_adhoc"))
-mode:value("ahdemo", translate("a_w_ahdemo"))
-mode:value("sta", translate("a_w_client"))
-mode:value("wds", translate("a_w_wds"))
-mode:value("monitor", translate("a_w_monitor"))
-
-s:option(Value, "bssid", "BSSID").optional = true
-
-s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true
-
-s:option(Flag, "frameburst", translate("a_w_brcmburst")).optional = true
-s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
-
-
-encr = s:option(ListValue, "encryption", translate("encryption"))
-encr:value("none", "keine")
-encr:value("wep", "WEP")
-encr:value("PSK", "WPA-PSK")
-encr:value("WPA", "WPA-EAP", {mode="ap"}, {mode="sta"})
-encr:value("PSK2", "WPA2-PSK")
-encr:value("WPA2", "WPA2-EAP", {mode="ap"}, {mode="sta"})
-encr:depends("mode", "ap")
-encr:depends("mode", "sta")
-encr:depends("mode", "wds")
-
-server = s:option(Value, "server", translate("a_w_radiussrv"))
-server:depends({mode="ap", encryption="WPA"})
-server:depends({mode="ap", encryption="WPA2"})
-server.rmempty = true
-
-port = s:option(Value, "port", translate("a_w_radiusport"))
-port:depends({mode="ap", encryption="WPA"})
-port:depends({mode="ap", encryption="WPA2"})
-port.rmempty = true
-
-key = s:option(Value, "key", translate("key"))
-key:depends("encryption", "wep")
-key:depends("encryption", "PSK")
-key:depends({mode="ap", encryption="WPA"})
-key:depends("encryption", "PSK2")
-key:depends({mode="ap", encryption="WPA2"})
-key.rmempty = true
-
-nasid = s:option(Value, "nasid", translate("a_w_nasid"))
-nasid:depends({mode="ap", encryption="WPA"})
-nasid:depends({mode="ap", encryption="WPA2"})
-nasid.rmempty = true
-
-eaptype = s:option(ListValue, "eap_type", translate("a_w_eaptype"))
-eaptype:value("TLS")
-eaptype:value("PEAP")
-eaptype:depends({mode="sta", encryption="WPA"})
-eaptype:depends({mode="sta", encryption="WPA2"})
-
-cacert = s:option(Value, "ca_cert", translate("a_w_cacert"))
-cacert:depends({mode="sta", encryption="WPA"})
-cacert:depends({mode="sta", encryption="WPA2"})
-
-privkey = s:option(Value, "priv_key", translate("a_w_tlsprivkey"))
-privkey:depends({mode="sta", eap_type="TLS", encryption="WPA2"})
-privkey:depends({mode="sta", eap_type="TLS", encryption="WPA"})
-
-privkeypwd = s:option(Value, "priv_key_pwd", translate("a_w_tlsprivkeypwd"))
-privkeypwd:depends({mode="sta", eap_type="TLS", encryption="WPA2"})
-privkeypwd:depends({mode="sta", eap_type="TLS", encryption="WPA"})
-
-
-auth = s:option(Value, "auth", translate("a_w_peapauth"))
-auth:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
-auth:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
-
-identity = s:option(Value, "identity", translate("a_w_peapidentity"))
-identity:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
-identity:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
-
-password = s:option(Value, "password", translate("a_w_peappassword"))
-password:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
-password:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
-
-
-
-
-s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")).optional = true
-
-s:option(Flag, "hidden", translate("a_w_hideessid")).optional = true
-
-
-
-return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_wifi/index.htm b/modules/admin-full/luasrc/view/admin_wifi/index.htm
deleted file mode 100644 (file)
index 58281d1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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
-
-$Id$
-
--%>
-<%+header%>
-<h1><%:wifi%></h1>
-<p><%:a_w_wifi1%></p>
-<p><%:a_w_wifi2%></p>
-<p><%:a_w_wifi3%></p>  
-<%+footer%>
\ No newline at end of file