Redesigned firewall configuration
[project/luci.git] / applications / luci-fw / luasrc / controller / luci_fw / luci_fw.lua
index 4efddb6e77b0a495ef279971bb52a60f2f4d043f..4d8c13840e7ac30caf61e7a19e4308a0cfe64253 100644 (file)
@@ -3,8 +3,23 @@ module("luci.controller.luci_fw.luci_fw", package.seeall)
 function index()
        require("luci.i18n").loadc("luci-fw")
        local i18n = luci.i18n.translate
+       
+       local nodes = {}
 
-       entry({"admin", "network", "portfw"}, cbi("luci_fw/portfw"), i18n("fw_portfw", "Portweiterleitung"), 70).i18n = "luci-fw"
-       entry({"admin", "network", "routing"}, cbi("luci_fw/routing"), i18n("fw_routing", "Routing"), 73).i18n = "luci-fw"
-       entry({"admin", "network", "firewall"}, cbi("luci_fw/firewall"), i18n("fw_fw", "Firewall"), 76).i18n = "luci-fw"
+       table.insert(nodes, entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60))
+       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"), i18n("fw_portfw", "Portweiterleitung"), 70))
+       
+       for i,n in ipairs(nodes) do
+               n.i18n = "luci-fw"
+               n.dependent = true
+       end     
 end
\ No newline at end of file