diff options
author | Steven Barth <steven@midlink.org> | 2008-05-08 16:04:18 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-08 16:04:18 +0000 |
commit | 214bfdc19887c3df373d1323afd9738eee4f64ca (patch) | |
tree | 1b3660fd9a8db552d50c9ef9d11b9dee35bf8fac /modules/freifunk/src/controller/public/status.lua | |
parent | aa9ccf77c6648515ba58c37b9345cdbd561028db (diff) |
* Fixed #2030
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 + + |