* luci: add memory status patches from soma
[project/luci.git] / modules / freifunk / luasrc / view / public_status / index.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15 <%+header%>
16 <h1><%:status%></h1>
17 <h2><%:system%></h2>
18
19 <br />
20 <table cellspacing="0" cellpadding="6" class="smalltext">
21 <tr>
22 <th><%:system_type%>:</th>
23 <td><%=system%></td>
24 </tr>
25 <tr>
26 <th><%:cpu%>:</th>
27 <td><%=model%></td>
28 </tr>
29 <tr>
30 <th><%:ram%>:<br /><small><%:total%>/<%:cached%>/<%:buffers%>/<%:free%></small></th>
31 <td><%=memtotal%> / <%=memcached%> / <%=membuffers%> / <%=memfree%> KB<br />
32 <div id="memorybar">
33         <div id="memfree" style="width:<%=perc_memfree%>%"></div> 
34         <div id="membuffers" style="width:<%=perc_membuffers%>%"></div>
35         <div id="memcached" style="width:<%=perc_memcached%>%"></div>
36 </div>
37 </td>
38 </tr>
39 </table>
40 <br /><br />
41
42 <h2><%:wifi%></h2>
43 <br />
44 <table cellspacing="0" cellpadding="6" class="smalltext">
45 <tr>
46 <th><%:name%></th>
47 <th><%:protocol%></th>
48 <th><%:frequency%></th>
49 <th><%:power%></th>
50 <th><%:bitrate%></th>
51 <th><%:rts%></th>
52 <th><%:frag%></th>
53 <th><%:link%></th>
54 <th><%:signal%></th>
55 <th><%:noise%></th>
56 </tr>
57 <%for k, v in pairs(luci.sys.wifi.getiwconfig()) do
58 %>
59 <tr>
60 <td rowspan="2"><%=k%></td>
61 <td><%=v[1]%></td>
62 <td><%=v.Frequency%></td>
63 <td><%=v["Tx-Power"]%></td>
64 <td><%=v["Bit Rate"]%></td>
65 <td><%=v["RTS thr"]%></td>
66 <td><%=v["Fragment thr"]%></td>
67 <td><%=v["Link Quality"]%></td>
68 <td><%=v["Signal level"]%></td>
69 <td><%=v["Noise level"]%></td>
70 </tr>
71 <tr>
72 <td colspan="4"><strong>ESSID: </strong><%=v.ESSID%></td>
73 <td colspan="5"><strong>BSSID: </strong><%=(v.Cell or v["Access Point"])%></td>
74 </tr>
75 <%end%>
76 </table>
77 <br />
78 <br />
79 <h2><%:defroutes%></h2>
80 <br />
81 <table cellspacing="0" cellpadding="6" class="smalltext">
82 <tr>
83 <th><%:gateway%></th>
84 <th><%:metric%></th>
85 <th><%:iface%></th>
86 </tr>
87 <%
88 for i, rt in pairs(routes) do
89 %>
90 <tr>
91 <td><%=luci.sys.net.hexip4(rt.Gateway)%></th>
92 <td><%=rt.Metric%></th>
93 <td><%=rt.Iface%></th>
94 </tr>
95 <% end %>
96 </table>
97 <%+footer%>