* ffluci.sys.net.hexip4: Added option for big endian support
[project/luci.git] / module / public-core / src / controller / public / status.lua
1 module("ffluci.controller.public.status", package.seeall)
2
3 function action_index()
4 local data = {}
5
6 data.s, data.m, data.r = ffluci.sys.sysinfo()
7
8 data.wifi = ffluci.sys.wifi.getiwconfig()
9
10 data.routes = {}
11 for i, r in pairs(ffluci.sys.net.routes()) do
12 if r.Destination == "00000000" then
13 r.Gateway = ffluci.sys.net.hexip4(r.Gateway)
14 table.insert(data.routes, r)
15 end
16 end
17
18
19 ffluci.template.render("public_status/index", data)
20 end
21
22