4781426292a5960ec552b0da76f06a9054b26c0c
[project/luci.git] / modules / niu / luasrc / controller / niu / wireless.lua
1 --[[
2 LuCI - Lua Development Framework
3
4 Copyright 2009 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 local require = require
16 module "luci.controller.niu.wireless"
17
18 function index()
19         if not fs.access("/etc/config/wireless") then
20                 return
21         end
22
23
24         local toniu = {on_success_to={"niu"}}
25         
26         local e = entry({"niu", "wireless"}, alias("niu"), "Wireless", 20)
27         --e.niu_dbtemplate = "niu/wireless"
28         e.niu_dbtasks = true
29         e.niu_dbicon = "icons32/network-wireless.png"
30
31         entry({"niu", "wireless", "ap"}, 
32         cbi("niu/wireless/ap", toniu), "Configure Private Access Point", 1)
33 end