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 fab7883b2a8ce1162cdc1ad324bf0e3c2ca94e7e..37a206ad6fac4d251fa6121b0407704c50705a63 100644 (file)
 
 <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") ..