libs/web: add network_netlist widget option to filter virtual networks
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 10 Oct 2011 18:10:12 +0000 (18:10 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 10 Oct 2011 18:10:12 +0000 (18:10 +0000)
libs/web/luasrc/view/cbi/network_netlist.htm

index fab7883..37a206a 100644 (file)
 
 <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" and net:name() ~= self.exclude then %>
+              if (net:name() ~= "loopback") and
+                     (net:name() ~= self.exclude) and
+                     (not self.novirtual or not net:is_virtual())
+                  then %>
        <li style="padding:0.25em 0">
                <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 style="padding:0.25em 0">
                <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") ..