X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_network%2Fiface_overview.htm;h=4be062985a3914c2172becefb00928d1b4259b36;hp=c1a6b8f40ce9e3301ed11fe432157904fe62956c;hb=bf25765406456a42ea7d619466e914277cbe479b;hpb=63a8252dd02dfe5c7588c475399f3bcebc0fcd53 diff --git a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm index c1a6b8f40..4be062985 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm @@ -8,31 +8,44 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -$Id$ - -%> <%- local ntm = require "luci.model.network".init() + local fwm = require "luci.model.firewall".init() local net + local ifaces = { } local netlist = { } for _, net in ipairs(ntm:get_networks()) do if net:name() ~= "loopback" then - netlist[#netlist+1] = net:name() + local z = fwm:get_zone_by_network(net:name()) + ifaces[#ifaces+1] = net:name() + netlist[#netlist+1] = { + net:name(), z and z:name() or "-", z + } end end + + table.sort(netlist, + function(a, b) + if a[2] ~= b[2] then + return a[2] < b[2] + else + return a[1] < b[1] + end + end) -%>
- | <%:Interface%> | -<%:Uptime%> | -<%:MAC%> | -<%:Addresses%> | -<%:Transfer%> | -<%:Actions%> | +<%:Network%> | +<%:Status%> | +<%:Actions%> | |
---|---|---|---|---|---|---|---|---|---|---|
- <%=net%> - | -
- - ? - |
- ? | -? | -<%:Collecting data...%> | -
- <%:RX%>: 0 <%:KB%> (0 <%:Pkts.%>) - <%:TX%>: 0 <%:KB%> (0 <%:Pkts.%>) + |
+
+
+ <%=net[1]:upper()%>
+
+
+
+ + ? + |
- - - + | + <%:Collecting data...%> | -- "> - " onclick="return confirm('<%:Really delete this interface? The deletion cannot be undone!\nYou might lose access to this router if you are connected via this interface.%>')"> + | + + + '" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" /> + '" title="<%:Delete this interface%>" value="<%:Delete%>" /> |