2 LuCI - Lua Development Framework
4 Copyright 2009 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 local require = require
16 module "luci.controller.niu.traffic"
19 local toniu = {on_success_to={"niu"}}
21 local e = entry({"niu", "traffic"}, alias("niu"), "Network Traffic", 30)
22 e.niu_dbtemplate = "niu/traffic"
24 e.niu_dbicon = "icons32/preferences-system-network.png"
26 if fs.access("/etc/config/firewall") then
27 entry({"niu", "traffic", "portfw"}, cbi("niu/traffic/portfw",
28 toniu), "Manage Port Forwarding", 1)
31 if fs.access("/etc/config/qos") then
32 entry({"niu", "traffic", "qos"}, cbi("niu/traffic/qos",
33 toniu), "Manage Prioritization (QoS)", 2)
36 entry({"niu", "traffic", "routes"}, cbi("niu/traffic/routes",
37 toniu), "Manage Traffic Routing", 30)
39 entry({"niu", "traffic", "conntrack"}, call("cnntrck"),
40 "Display Local Network Activity", 50)
44 require "luci.template".render("niu/traffic/conntrack")