diff options
author | Steven Barth <steven@midlink.org> | 2008-05-08 16:14:49 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-08 16:14:49 +0000 |
commit | 424a6ce48d2c1eba12493ad8bb5a8350a23f7dbf (patch) | |
tree | 1b3660fd9a8db552d50c9ef9d11b9dee35bf8fac /modules/freifunk/src/controller/public/status.lua | |
parent | 1f6c5cccd269ad70257cacb5d6f13e421d6cfb4f (diff) |
* Readded freifunk module
Diffstat (limited to 'modules/freifunk/src/controller/public/status.lua')
-rw-r--r-- | modules/freifunk/src/controller/public/status.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/freifunk/src/controller/public/status.lua b/modules/freifunk/src/controller/public/status.lua new file mode 100644 index 000000000..8d2f7a303 --- /dev/null +++ b/modules/freifunk/src/controller/public/status.lua @@ -0,0 +1,21 @@ +module("ffluci.controller.public.status", package.seeall) + +function action_index() + local data = {} + + data.s, data.m, data.r = ffluci.sys.sysinfo() + + data.wifi = ffluci.sys.wifi.getiwconfig() + + data.routes = {} + for i, r in pairs(ffluci.sys.net.routes()) do + if r.Destination == "00000000" then + table.insert(data.routes, r) + end + end + + + ffluci.template.render("public_status/index", data) +end + + |