From 2c09564d762b692d970a531cca58eb52ba3807e7 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 14 Aug 2008 14:51:06 +0000 Subject: modules/admin-core: Added several cross-references to relevant configuration pages --- modules/admin-core/luasrc/tools/webadmin.lua | 1 + modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua | 4 +++- modules/admin-full/luasrc/model/cbi/admin_network/network.lua | 2 ++ modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua | 8 ++------ 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/admin-core/luasrc/tools/webadmin.lua b/modules/admin-core/luasrc/tools/webadmin.lua index ac11845d4..d6d952117 100644 --- a/modules/admin-core/luasrc/tools/webadmin.lua +++ b/modules/admin-core/luasrc/tools/webadmin.lua @@ -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) diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua index 1c9ae396a..f2f2e4742 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua @@ -11,6 +11,7 @@ You may obtain a copy of the License at $Id$ ]]-- +require("luci.tools.webadmin") require("luci.model.uci") require("luci.sys") require("luci.util") @@ -22,11 +23,12 @@ s.addremove = true s.anonymous = true iface = s:option(ListValue, "interface", translate("interface")) +luci.tools.webadmin.cbi_add_networks(iface) + luci.model.uci.foreach("network", "interface", function (section) if section[".name"] ~= "loopback" then iface.default = iface.default or section[".name"] - iface:value(section[".name"]) s:depends("interface", section[".name"]) end end) diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/network.lua b/modules/admin-full/luasrc/model/cbi/admin_network/network.lua index 228efc42d..d2ccb9b95 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/network.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/network.lua @@ -52,9 +52,11 @@ end ifname = s:option(DummyValue, "ifname", translate("device")) ifname.stateful = true +ifname.titleref = luci.dispatcher.build_url("admin", "network", "vlan") if luci.model.uci.load("firewall") then zone = s:option(DummyValue, "_zone", translate("zone")) + zone.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "zones") function zone.cfgvalue(self, section) local zones = luci.tools.webadmin.network_get_zones(section) diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua index 4b2179a8f..0c62b58e9 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua @@ -11,6 +11,7 @@ You may obtain a copy of the License at $Id$ ]]-- +require("luci.tools.webadmin") m = Map("wireless", translate("networks"), translate("a_w_networks1")) s = m:section(TypedSection, "wifi-iface", "") @@ -27,12 +28,7 @@ luci.model.uci.foreach("wireless", "wifi-device", network = s:option(ListValue, "network", translate("network"), translate("a_w_network1")) network:value("") -luci.model.uci.foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - network:value(section[".name"]) - end - end) +luci.tools.webadmin.cbi_add_networks(network) mode = s:option(ListValue, "mode", translate("mode")) mode:value("ap", translate("a_w_ap")) -- cgit v1.2.3