diff options
author | Steven Barth <steven@midlink.org> | 2009-11-16 16:58:48 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-11-16 16:58:48 +0000 |
commit | 2176dae3a0a648805f7de447e4af7ead8b7655dd (patch) | |
tree | 877c2986165224e1982cdbae350b3f1d35fc50a2 /modules/niu/luasrc/controller | |
parent | efe5fc77f9c76ca75ae0e4c1735065589d5047c8 (diff) |
NIU:
+PortFw
+QoS
Reorganize Network
Diffstat (limited to 'modules/niu/luasrc/controller')
-rw-r--r-- | modules/niu/luasrc/controller/niu/network.lua | 12 | ||||
-rw-r--r-- | modules/niu/luasrc/controller/niu/system.lua | 2 | ||||
-rw-r--r-- | modules/niu/luasrc/controller/niu/traffic.lua | 45 |
3 files changed, 47 insertions, 12 deletions
diff --git a/modules/niu/luasrc/controller/niu/network.lua b/modules/niu/luasrc/controller/niu/network.lua index c0afba9e52..de3d7d49ed 100644 --- a/modules/niu/luasrc/controller/niu/network.lua +++ b/modules/niu/luasrc/controller/niu/network.lua @@ -32,22 +32,12 @@ function index() uci.inst_state:foreach("dhcp", "dhcp", function(s) if s.interface == "lan" and s.ignore ~= "1" then entry({"niu", "network", "assign"}, cbi("niu/network/assign", - toniu), "Display and Customize Address Assignment", 30) + toniu), "Manage Address Assignment", 30) end end) - - entry({"niu", "network", "routes"}, cbi("niu/network/routes", - toniu), "Display and Customize Routing", 40) - - entry({"niu", "network", "conntrack"}, call("cnntrck"), - "Display Local Network Activity", 50) if fs.access("/etc/config/ddns") then entry({"niu", "network", "ddns"}, cbi("niu/network/ddns", toniu), "Configure Dynamic-DNS names", 60) end end - -function cnntrck() - require "luci.template".render("niu/network/conntrack") -end diff --git a/modules/niu/luasrc/controller/niu/system.lua b/modules/niu/luasrc/controller/niu/system.lua index e9e767a1de..593a448839 100644 --- a/modules/niu/luasrc/controller/niu/system.lua +++ b/modules/niu/luasrc/controller/niu/system.lua @@ -18,7 +18,7 @@ module "luci.controller.niu.system" function index() local toniu = {on_success_to={"niu"}} - local e = entry({"niu", "system"}, alias("niu"), "System", 30) + local e = entry({"niu", "system"}, alias("niu"), "System", 40) e.niu_dbtemplate = "niu/system" e.niu_dbtasks = true e.niu_dbicon = "icons32/preferences-system.png" diff --git a/modules/niu/luasrc/controller/niu/traffic.lua b/modules/niu/luasrc/controller/niu/traffic.lua new file mode 100644 index 0000000000..76584eabf3 --- /dev/null +++ b/modules/niu/luasrc/controller/niu/traffic.lua @@ -0,0 +1,45 @@ +--[[ +LuCI - Lua Development Framework + +Copyright 2009 Steven Barth <steven@midlink.org> + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +local require = require +module "luci.controller.niu.traffic" + +function index() + local toniu = {on_success_to={"niu"}} + + local e = entry({"niu", "traffic"}, alias("niu"), "Network Traffic", 30) + e.niu_dbtemplate = "niu/traffic" + e.niu_dbtasks = true + e.niu_dbicon = "icons32/preferences-system-network.png" + + if fs.access("/etc/config/firewall") then + entry({"niu", "traffic", "portfw"}, cbi("niu/traffic/portfw", + toniu), "Manage Port Forwarding", 1) + end + + if fs.access("/etc/config/qos") then + entry({"niu", "traffic", "qos"}, cbi("niu/traffic/qos", + toniu), "Manage Prioritization (QoS)", 2) + end + + entry({"niu", "traffic", "routes"}, cbi("niu/traffic/routes", + toniu), "Manage Traffic Routing", 30) + + entry({"niu", "traffic", "conntrack"}, call("cnntrck"), + "Display Local Network Activity", 50) +end + +function cnntrck() + require "luci.template".render("niu/traffic/conntrack") +end
\ No newline at end of file |