<%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ -%> <%+header%> <%- local system, model, memtotal = luci.sys.sysinfo() local uptime = luci.sys.uptime() uptime = tonumber(uptime) local utdays = math.floor(uptime / 86400) uptime = uptime % 86400 local uthour = math.floor(uptime / 3600) uptime = uptime % 3600 local utmins = math.floor(uptime / 60) local utsecs = uptime % 60 local iwconfig = luci.sys.wifi.getiwconfig() -%>







<%:hostname%>: <%=luci.sys.hostname()%>
<%:system%>: <%=system%>
<%:m_i_processor%>: <%=model%>
<%:m_i_memory%>: <%=string.format("%.2f", tonumber(memtotal) / 1024)%> MiB
<%:m_i_systemtime%>: <%=os.date("%c")%>
<%:m_i_uptime%>: <%=string.format("%dd %d:%d:%.0f", utdays, uthour, utmins, utsecs)%>


<%:ipaddress%>: <%=luci.model.uci.get_statevalue("network", "lan", "ipaddr")%>
<%:netmask%>: <%=luci.model.uci.get_statevalue("network", "lan", "netmask")%>


<%:ipaddress%>: <%=luci.model.uci.get_statevalue("network", "wan", "ipaddr")%>
<%:netmask%>: <%=luci.model.uci.get_statevalue("network", "wan", "netmask")%>
<%- if next(iwconfig) then %>


<%for k, v in pairs(iwconfig) do %> <%end%>
<%:name%> <%:protocol%> <%:frequency%> <%:power%> <%:bitrate%> <%:rts%> <%:frag%> <%:link%> <%:signal%> <%:noise%>
<%=k%> <%=v[1]%> <%=v.Frequency%> <%=v["Tx-Power"]%> <%=v["Bit Rate"]%> <%=v["RTS thr"]%> <%=v["Fragment thr"]%> <%=v["Link Quality"]%> <%=v["Signal level"]%> <%=v["Noise level"]%>
ESSID: <%=v.ESSID%> BSSID: <%=(v.Cell or v["Access Point"])%>
<%-end%> <%+footer%>