Cleanup overview / details nodes
This commit is contained in:
parent
f911758bc2
commit
bb44869de9
4 changed files with 17 additions and 42 deletions
|
@ -3,25 +3,11 @@ module("luci.controller.luci_fw.luci_fw", package.seeall)
|
|||
function index()
|
||||
require("luci.i18n").loadc("luci-fw")
|
||||
local i18n = luci.i18n.translate
|
||||
|
||||
local nodes = {}
|
||||
|
||||
table.insert(nodes, entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60))
|
||||
nodes[#nodes].index = true
|
||||
entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60).i18n = "luci-fw"
|
||||
entry({"admin", "network", "firewall", "zones"}, cbi("luci_fw/zones"), i18n("fw_zones"), 10)
|
||||
entry({"admin", "network", "firewall", "redirect"}, arcombine(cbi("luci_fw/redirect"), cbi("luci_fw/rrule")), i18n("fw_redirect"), 30).leaf = true
|
||||
entry({"admin", "network", "firewall", "rule"}, arcombine(cbi("luci_fw/traffic"), cbi("luci_fw/trule")), i18n("fw_traffic"), 20).leaf = true
|
||||
|
||||
table.insert(nodes, entry({"admin", "network", "firewall", "zones"}, cbi("luci_fw/zones"), i18n("fw_zones"), 10))
|
||||
table.insert(nodes, entry({"admin", "network", "firewall", "redirection"}, cbi("luci_fw/redirect"), i18n("fw_redirect"), 30))
|
||||
table.insert(nodes, entry({"admin", "network", "firewall", "traffic"}, cbi("luci_fw/traffic"), i18n("fw_traffic"), 20))
|
||||
|
||||
table.insert(nodes, entry({"admin", "network", "firewall", "rule"}, cbi("luci_fw/trule")))
|
||||
nodes[#nodes].leaf = true
|
||||
table.insert(nodes, entry({"admin", "network", "firewall", "redirect"}, cbi("luci_fw/rrule")))
|
||||
nodes[#nodes].leaf = true
|
||||
|
||||
table.insert(nodes, entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw", {autoapply=true}), i18n("fw_portfw", "Portweiterleitung"), 70))
|
||||
|
||||
for i,n in ipairs(nodes) do
|
||||
n.i18n = "luci-fw"
|
||||
n.dependent = true
|
||||
end
|
||||
entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw", {autoapply=true}), i18n("fw_portfw", "Portweiterleitung"), 70).i18n = "luci-fw"
|
||||
end
|
|
@ -23,7 +23,7 @@ s.addremove = false
|
|||
|
||||
back = s:option(DummyValue, "_overview", translate("overview"))
|
||||
back.value = ""
|
||||
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "redirection")
|
||||
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "redirect")
|
||||
|
||||
name = s:option(Value, "_name", translate("name"))
|
||||
name.rmempty = true
|
||||
|
|
|
@ -20,7 +20,7 @@ s.addremove = false
|
|||
|
||||
back = s:option(DummyValue, "_overview", translate("overview"))
|
||||
back.value = ""
|
||||
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "traffic")
|
||||
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "rule")
|
||||
|
||||
|
||||
name = s:option(Value, "_name", translate("name")..translate("cbi_optional"))
|
||||
|
|
|
@ -28,47 +28,36 @@ function index()
|
|||
page.target = cbi("admin_network/vlan")
|
||||
page.title = i18n("a_n_switch")
|
||||
page.order = 20
|
||||
|
||||
local page = node("admin", "network", "wireless")
|
||||
page.target = form("admin_network/wireless")
|
||||
page.title = i18n("wifi")
|
||||
|
||||
local page = entry({"admin", "network", "wireless"}, arcombine(cbi("admin_network/wireless"), cbi("admin_network/wifi")), i18n("wifi"), 15)
|
||||
page.i18n = "wifi"
|
||||
page.order = 15
|
||||
page.leaf = true
|
||||
page.subindex = true
|
||||
|
||||
uci:foreach("wireless", "wifi-device",
|
||||
function (section)
|
||||
local ifc = section[".name"]
|
||||
entry({"admin", "network", "wireless", ifc},
|
||||
alias("admin", "network", "wifi", ifc),
|
||||
true,
|
||||
ifc:upper()).i18n = "wifi"
|
||||
end
|
||||
)
|
||||
|
||||
local page = node("admin", "network", "wifi")
|
||||
page.target = cbi("admin_network/wifi")
|
||||
|
||||
local page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), i18n("interfaces", "Schnittstellen"), 10)
|
||||
page.leaf = true
|
||||
page.i18n = "wifi"
|
||||
|
||||
local page = node("admin", "network", "network")
|
||||
page.target = cbi("admin_network/network")
|
||||
page.title = i18n("interfaces", "Schnittstellen")
|
||||
page.order = 10
|
||||
page.subindex = true
|
||||
|
||||
uci:foreach("network", "interface",
|
||||
function (section)
|
||||
local ifc = section[".name"]
|
||||
if ifc ~= "loopback" then
|
||||
entry({"admin", "network", "network", ifc},
|
||||
alias("admin", "network", "ifaces", ifc),
|
||||
true,
|
||||
ifc:upper())
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
local page = node("admin", "network", "ifaces")
|
||||
page.target = cbi("admin_network/ifaces")
|
||||
page.leaf = true
|
||||
|
||||
local page = node("admin", "network", "dhcp")
|
||||
page.target = cbi("admin_network/dhcp")
|
||||
page.title = "DHCP"
|
||||
|
@ -105,4 +94,4 @@ function index()
|
|||
60
|
||||
)
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue