summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk/src/controller/public/status.lua
blob: 8d2f7a303fc7a4427b5a13ede224177ba28a2eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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