summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk/luasrc/controller
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-11-29 20:46:26 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-11-29 20:46:26 +0000
commitdda65d2b94f11f69537bed3c46d3c6e80234291b (patch)
tree3073130922cdb6a34ba1be32e2c020d064a6d5ae /modules/freifunk/luasrc/controller
parent82f08a4a1d1f7d54ccc82326c02f40f11a028409 (diff)
libs/core/ip: optmizations
libs/sys: implement defaultroute6(), change return values of routes() and routes6() modules/admin-full: adept route config page to new api modules/freifunk: adept overview page to new routes api
Diffstat (limited to 'modules/freifunk/luasrc/controller')
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/freifunk.lua37
1 files changed, 8 insertions, 29 deletions
diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
index 9399d5093..533211b00 100644
--- a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
+++ b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
@@ -30,18 +30,18 @@ function index()
page.setgroup = "nogroup"
page.i18n = "freifunk"
page.index = true
-
+
local page = node("freifunk", "index")
page.target = template("freifunk/index")
page.title = "Übersicht"
page.order = 10
page.indexignore = true
-
+
local page = node("freifunk", "index", "contact")
page.target = template("freifunk/contact")
page.title = "Kontakt"
-
-
+
+
local page = node("freifunk", "status")
page.target = form("freifunk/public_status")
page.title = "Status"
@@ -49,43 +49,22 @@ function index()
page.i18n = "admin-core"
page.setuser = false
page.setgroup = false
-
+
assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, "OLSR", 30)
-
+
if luci.fs.isfile("/etc/config/luci_statistics") then
assign({"freifunk", "graph"}, {"admin", "statistics", "graph"}, i18n("stat_statistics", "Statistiken"), 40)
end
-
+
assign({"mini", "freifunk"}, {"admin", "freifunk"}, "Freifunk", 15)
entry({"admin", "freifunk"}, alias("admin", "freifunk", "index"), "Freifunk", 15)
local page = node("admin", "freifunk", "index")
page.target = cbi("freifunk/freifunk")
page.title = "Freifunk"
page.order = 30
-
+
local page = node("admin", "freifunk", "contact")
page.target = cbi("freifunk/contact")
page.title = "Kontakt"
page.order = 40
end
-
-function action_status()
- local data = {}
-
- data.system, data.model, data.memtotal, data.memcached, data.membuffers, data.memfree = luci.sys.sysinfo()
- data.perc_memfree = math.floor((data.memfree/data.memtotal)*100)
- data.perc_membuffers = math.floor((data.membuffers/data.memtotal)*100)
- data.perc_memcached = math.floor((data.memcached/data.memtotal)*100)
-
- data.wifi = luci.sys.wifi.getiwconfig()
-
- data.routes = {}
- for i, r in pairs(luci.sys.net.routes()) do
- if r.Destination == "00000000" then
- table.insert(data.routes, r)
- end
- end
-
-
- luci.template.render("public_status/index", data)
-end \ No newline at end of file