modules/admin-full: Rewrote route configuration page
[project/luci.git] / modules / admin-core / luasrc / tools / webadmin.lua
index ac11845..57941c9 100644 (file)
@@ -76,6 +76,7 @@ function cbi_add_networks(field)
                        end
                end
        )
+       field.titleref = luci.dispatcher.build_url("admin", "network", "network")
 end
 
 function cbi_add_knownips(field)
@@ -115,4 +116,22 @@ function firewall_find_zone(name)
        )
        
        return find
+end
+
+function iface_get_network(iface)
+       local net
+       
+       luci.model.uci.foreach("network", "interface",
+               function (section)
+                       local ifname = luci.model.uci.get_statevalue(
+                               "network", section[".name"], "ifname"
+                       )
+                       
+                       if iface == ifname then
+                               net = section[".name"]
+                       end
+               end
+       )
+       
+       return net
 end
\ No newline at end of file