2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5 Copyright 2010 Manuel Munz <freifunk at somakoma dot de>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
15 require("luci.model.uci")
16 local uci = luci.model.uci.cursor_state()
18 uci:foreach("olsrd", "olsrd", function(s)
19 if s.SmartGateway and s.SmartGateway == "yes" then has_smartgw = true end
25 <h2><a id="content" name="content"><%:SmartGW announcements%></a></h2>
26 <% if has_smartgw then %>
27 <p><%:Overview of smart gateways in this network%></p>
29 <table class="smalltext" cellspacing="0" cellpadding="6">
36 <th><%:Downlink%></th>
42 <% for k, gw in ipairs(gws) do %>
44 <td><a href="http://<%=gw["Gateway IP"]%>/cgi-bin-status.html"><%=gw["Gateway IP"]%></a></td>
45 <td><%=gw.Status%></td>
47 <td><%=gw.Hopcnt%></td>
48 <td><%=gw.Uplink%></td>
49 <td><%=gw.Downlnk%></td>
52 <td><%=gw.Prefix%></td>
59 SmartGateway is not configured on this system.