From 214bfdc19887c3df373d1323afd9738eee4f64ca Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 8 May 2008 16:04:18 +0000 Subject: * Fixed #2030 --- modules/freifunk/src/controller/public/status.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/freifunk/src/controller/public/status.lua (limited to 'modules/freifunk/src/controller/public/status.lua') 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 + + -- cgit v1.2.3