modules/admin-full: Added Firewall-Zone column to network interface overview
authorSteven Barth <steven@midlink.org>
Wed, 13 Aug 2008 23:14:19 +0000 (23:14 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 13 Aug 2008 23:14:19 +0000 (23:14 +0000)
i18n/english/luasrc/i18n/default.en.lua
i18n/german/luasrc/i18n/default.de.lua
modules/admin-full/luasrc/model/cbi/admin_network/network.lua

index 6666864..ac53274 100644 (file)
@@ -110,3 +110,4 @@ version = "Version"
 
 webui = "Web UI"
 wifi = "Wifi"
+zone = "Zone"
index a589773..a9c68cf 100644 (file)
@@ -110,3 +110,4 @@ version = "Version"
 
 webui = "Weboberfläche"
 wifi = "Drahtlos"
+zone = "Zone"
\ No newline at end of file
index 0fffd32..228efc4 100644 (file)
@@ -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 ""