2 LuCI - Lua Configuration Interface
3 Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
17 local value = self:formvalue(section)
18 if not value or value == "-" then
19 value = self:cfgvalue(section) or self.default
22 local nwm = require "luci.model.network".init()
23 local net = nwm:get_network(value)
27 <div style="padding:0.5em">
28 <span style="background-color:#FFFFFF; border:1px solid #CCCCCC; padding:2px"><%=net:name()%>:
31 for _, iface in ipairs(net:get_interfaces()) do
32 if not iface:is_bridge() then
35 <img<%=attr("title", iface:get_i18n())%> style="width:16px; height:16px; vertical-align:middle" src="<%=resource%>/icons/<%=iface:type()%><%=iface:is_up() and "" or "_disabled"%>.png" />
37 <% if empty then %><em><%:(no interfaces attached)%></em><% end %>