2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
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
10 http://www.apache.org/licenses/LICENSE-2.0
12 $Id: mid.htm 5448 2009-10-31 15:54:11Z jow $
16 require("luci.model.uci")
17 local uci = luci.model.uci.cursor_state()
19 uci:foreach("olsrd", "olsrd", function(s)
20 if s.SmartGateway and s.SmartGateway == "yes" then has_smartgw = true end
26 <h2><a id="content" name="content"><%:SmartGW announcements%></a></h2>
27 <% if has_smartgw then %>
28 <p><%:Overview of smart gateways in this network%></p>
30 <table class="smalltext" cellspacing="0" cellpadding="6">
37 <th><%:Downlink%></th>
43 <% for k, gw in ipairs(gws) do %>
45 <td><a href="http://<%=gw["Gateway IP"]%>/cgi-bin-status.html"><%=gw["Gateway IP"]%></a></td>
46 <td><%=gw.Status%></td>
48 <td><%=gw.Hopcnt%></td>
49 <td><%=gw.Uplink%></td>
50 <td><%=gw.Downlnk%></td>
53 <td><%=gw.Prefix%></td>
60 SmartGateway is not configured on this system.