f364ca088bc87fe03002520833d179c8114bbed4
[project/luci.git] / libs / web / luasrc / view / cbi / network_netinfo.htm
1 <%+cbi/valueheader%>
2
3 <%-
4 local value = self:formvalue(section)
5 if not value or value == "-" then
6 value = self:cfgvalue(section) or self.default
7 end
8
9 local nwm = require "luci.model.network".init()
10 local net = nwm:get_network(value)
11 -%>
12
13 <% if net then %>
14 <div style="padding:0.5em">
15 <span style="background-color:#FFFFFF; border:1px solid #CCCCCC; padding:2px"><%=net:name()%>:
16 <%
17 local empty = true
18 for _, iface in ipairs(net:get_interfaces() or { net:get_interface() }) do
19 if not iface:is_bridge() then
20 empty = false
21 %>
22 <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" />
23 <% end end %>
24 <% if empty then %><em><%:(no interfaces attached)%></em><% end %>
25 </span>
26 </div>
27 <% end %>
28
29 <%+cbi/valuefooter%>