From 3d794abec4531bd2a2e44e2cb0e2ce13c657dcdb Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 18 Jul 2008 21:33:25 +0000 Subject: modules/admin-mini: Several tweaks, initial status page --- modules/admin-mini/luasrc/view/mini/index.htm | 119 +++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 3 deletions(-) (limited to 'modules/admin-mini/luasrc/view') diff --git a/modules/admin-mini/luasrc/view/mini/index.htm b/modules/admin-mini/luasrc/view/mini/index.htm index 4ea58c2b8..1b9e46aae 100644 --- a/modules/admin-mini/luasrc/view/mini/index.htm +++ b/modules/admin-mini/luasrc/view/mini/index.htm @@ -11,14 +11,127 @@ You may obtain a copy of the License at $Id$ +-%> +<% +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() -%> <%+header%>

<%:a_i_i_hello%>

<%:a_i_i_admin1%>

<%:a_i_i_admin2%>
<%:a_i_i_admin3%>

-

<%:a_i_i_admin4%>

-

<%:a_i_i_admin5%>

<%:a_i_i_admin6%>

-

<%:a_i_i_team%>

+

<%:a_i_i_team%>

+
+
+
+

Systemstatus

+ + + + + + + + + + + + + + + + + + + + + + + + + +
<%: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)%>
+ + +<%- if luci.model.uci.get_statevalue("network", "lan", "up") == "1" then %> +
+

<%:m_n_local%>

+ + + + + + + + + +
<%:ipaddress%>:<%=luci.model.uci.get_statevalue("network", "lan", "ipaddr")%>
<%:netmask%>:<%=luci.model.uci.get_statevalue("network", "lan", "netmask")%>
+<%- end %> + + +<%- if luci.model.uci.get_statevalue("network", "lan", "up") == "1" then %> +
+

<%:m_n_inet%>

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

<%:wifi%>

+
+ + + + + + + + + + + + + +<%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%> \ No newline at end of file -- cgit v1.2.3