1 module("luci.controller.freifunk.freifunk", package.seeall)
5 page.target = alias("freifunk")
7 local page = node("freifunk")
8 page.title = "Freifunk"
9 page.target = alias("freifunk", "index")
11 page.setuser = "nobody"
12 page.setgroup = "nogroup"
14 local page = node("freifunk", "index")
15 page.target = template("freifunk/index")
16 page.title = "Übersicht"
19 local page = node("freifunk", "index", "contact")
20 page.target = template("freifunk/contact")
21 page.title = "Kontakt"
24 local page = node("freifunk", "status")
25 page.target = action_status
31 local page = node("freifunk", "status", "routes")
32 page.target = template("public_status/routes")
33 page.title = "Routingtabelle"
36 local page = node("freifunk", "status", "iwscan")
37 page.target = template("public_status/iwscan")
38 page.title = "WLAN-Scan"
41 local page = node("admin", "index", "freifunk")
42 page.target = cbi("freifunk/freifunk")
43 page.title = "Freifunk"
46 local page = node("admin", "index", "contact")
47 page.target = cbi("freifunk/contact")
48 page.title = "Kontakt"
52 function action_status()
55 data.s, data.m, data.r = luci.sys.sysinfo()
57 data.wifi = luci.sys.wifi.getiwconfig()
60 for i, r in pairs(luci.sys.net.routes()) do
61 if r.Destination == "00000000" then
62 table.insert(data.routes, r)
67 luci.template.render("public_status/index", data)