From: Steven Barth Date: Wed, 13 Aug 2008 23:14:19 +0000 (+0000) Subject: modules/admin-full: Added Firewall-Zone column to network interface overview X-Git-Tag: 0.8.0~446 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=662f70a467a3bc62bbe3d38c732d4b5a85165a8d modules/admin-full: Added Firewall-Zone column to network interface overview --- diff --git a/i18n/english/luasrc/i18n/default.en.lua b/i18n/english/luasrc/i18n/default.en.lua index 6666864cd..ac532743b 100644 --- a/i18n/english/luasrc/i18n/default.en.lua +++ b/i18n/english/luasrc/i18n/default.en.lua @@ -110,3 +110,4 @@ version = "Version" webui = "Web UI" wifi = "Wifi" +zone = "Zone" diff --git a/i18n/german/luasrc/i18n/default.de.lua b/i18n/german/luasrc/i18n/default.de.lua index a58977384..a9c68cfbb 100644 --- a/i18n/german/luasrc/i18n/default.de.lua +++ b/i18n/german/luasrc/i18n/default.de.lua @@ -110,3 +110,4 @@ version = "Version" webui = "Weboberfläche" wifi = "Drahtlos" +zone = "Zone" \ No newline at end of file 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 0fffd32b6..228efc42d 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/network.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/network.lua @@ -53,6 +53,15 @@ end ifname = s:option(DummyValue, "ifname", translate("device")) ifname.stateful = true +if luci.model.uci.load("firewall") then + zone = s:option(DummyValue, "_zone", translate("zone")) + + function zone.cfgvalue(self, section) + local zones = luci.tools.webadmin.network_get_zones(section) + return zones and table.concat(zones, ", ") or "-" + end +end + hwaddr = s:option(DummyValue, "_hwaddr") function hwaddr.cfgvalue(self, section) local ix = self.map:stateget(section, "ifname") or ""