X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Ffreifunk%2Fluasrc%2Fcontroller%2Ffreifunk%2Ffreifunk.lua;h=e4ab2bba4d20a66bf21ade6796ea35fb5ddd386a;hb=e080fcebd2396c138d8c916d1cf385a88e0db246;hp=39ae5fe9add4186640a1e5ab815a65f8323dea91;hpb=561b0cfaa3fb8163d9ec74a3f96fd5b22ad54f33;p=project%2Fluci.git diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua index 39ae5fe9a..e4ab2bba4 100644 --- a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua +++ b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua @@ -1,7 +1,23 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth + +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.freifunk.freifunk", package.seeall) function index() + local i18n = luci.i18n.translate + local page = node() + page.lock = true page.target = alias("freifunk") local page = node("freifunk") @@ -10,6 +26,7 @@ function index() page.order = 5 page.setuser = "nobody" page.setgroup = "nogroup" + page.i18n = "freifunk" local page = node("freifunk", "index") page.target = template("freifunk/index") @@ -28,10 +45,14 @@ function index() page.setuser = false page.setgroup = false - assign({"freifunk", "status", "routes"}, node("admin", "status", "routes"), "Routingtabelle", 10) - assign({"freifunk", "status", "iwscan"}, node("admin", "status", "iwscan"), "WLAN-Scan", 20) + assign({"freifunk", "status", "routes"}, {"admin", "status", "routes"}, "Routingtabelle", 10) + assign({"freifunk", "status", "iwscan"}, {"admin", "status", "iwscan"}, "WLAN-Scan", 20) + + assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, "OLSR", 30) - assign({"freifunk", "olsr"}, node("admin", "status", "olsr"), "OLSR", 30) + if luci.fs.isfile("/etc/config/luci_statistics") then + assign({"freifunk", "statistics"}, {"admin", "statistics", "graph"}, i18n("stat_statistics", "Statistiken"), 40) + end local page = node("admin", "index", "freifunk") page.target = cbi("freifunk/freifunk") @@ -47,7 +68,8 @@ end function action_status() local data = {} - data.s, data.m, data.r = luci.sys.sysinfo() + data.system, data.model, data.memtotal, data.memcached, data.membuffers, data.memfree, data.perc_memfree, data.perc_membuffers, data.perc_memcached = luci.sys.sysinfo() + data.wifi = luci.sys.wifi.getiwconfig()