summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk/src/controller/public/status.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/freifunk/src/controller/public/status.lua')
-rw-r--r--modules/freifunk/src/controller/public/status.lua21
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
+
+