libs/web: add support for exclude property to ifacelist and netlist widgets
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 15 Nov 2010 12:28:25 +0000 (12:28 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 15 Nov 2010 12:28:25 +0000 (12:28 +0000)
libs/web/luasrc/view/cbi/network_ifacelist.htm
libs/web/luasrc/view/cbi/network_netlist.htm

index 5553da6ccfe0474749d39c93579829e5665e2b23..c4d392e9ed74ec2c424d59ac6c12152e311312a6 100644 (file)
@@ -40,7 +40,7 @@ $Id$
 <ul style="margin:0; list-style-type:none">
        <% for _, iface in ipairs(ifaces) do
             local link = iface:adminlink()
 <ul style="margin:0; list-style-type:none">
        <% for _, iface in ipairs(ifaces) do
             local link = iface:adminlink()
-         if not self.nobridges or not iface:is_bridge() then %>
+         if (not self.nobridges or not iface:is_bridge()) and iface:name() ~= self.exclude then %>
        <li>
                <input class="cbi-input-<%=self.widget or "radio"%>" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=
                        attr("type", self.widget or "radio") ..
        <li>
                <input class="cbi-input-<%=self.widget or "radio"%>" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=
                        attr("type", self.widget or "radio") ..
index 2d464cc878d720e2f343f0db65f479573735d22d..46da88fd1ab5080a33aed74e45bbd0e92485777d 100644 (file)
@@ -33,7 +33,7 @@ $Id$
 
 <ul style="margin:0; list-style-type:none; text-align:left">
        <% for _, net in ipairs(networks) do
 
 <ul style="margin:0; list-style-type:none; text-align:left">
        <% for _, net in ipairs(networks) do
-              if net:name() ~= "loopback" then %>
+              if net:name() ~= "loopback" and net:name() ~= self.exclude then %>
        <li style="padding:0.25em 0">
                <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=
                        attr("type", self.widget or "radio") ..
        <li style="padding:0.25em 0">
                <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=
                        attr("type", self.widget or "radio") ..