modules/admin-full: Added Firewall-Zone column to network interface overview
This commit is contained in:
parent
58f183a282
commit
662f70a467
3 changed files with 11 additions and 0 deletions
|
@ -110,3 +110,4 @@ version = "Version"
|
||||||
|
|
||||||
webui = "Web UI"
|
webui = "Web UI"
|
||||||
wifi = "Wifi"
|
wifi = "Wifi"
|
||||||
|
zone = "Zone"
|
||||||
|
|
|
@ -110,3 +110,4 @@ version = "Version"
|
||||||
|
|
||||||
webui = "Weboberfläche"
|
webui = "Weboberfläche"
|
||||||
wifi = "Drahtlos"
|
wifi = "Drahtlos"
|
||||||
|
zone = "Zone"
|
|
@ -53,6 +53,15 @@ end
|
||||||
ifname = s:option(DummyValue, "ifname", translate("device"))
|
ifname = s:option(DummyValue, "ifname", translate("device"))
|
||||||
ifname.stateful = true
|
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")
|
hwaddr = s:option(DummyValue, "_hwaddr")
|
||||||
function hwaddr.cfgvalue(self, section)
|
function hwaddr.cfgvalue(self, section)
|
||||||
local ix = self.map:stateget(section, "ifname") or ""
|
local ix = self.map:stateget(section, "ifname") or ""
|
||||||
|
|
Loading…
Reference in a new issue