Globally reduce copyright headers
[project/luci.git] / applications / luci-app-wshaper / luasrc / model / cbi / wshaper.lua
1 -- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
2 -- Licensed to the public under the Apache License 2.0.
3
4 require("luci.tools.webadmin")
5
6 m = Map("wshaper", translate("Wondershaper"),
7         translate("Wondershaper shapes traffic to ensure low latencies for interactive traffic even when your " ..
8         "internet connection is highly saturated."))
9
10 s = m:section(NamedSection, "settings", "wshaper", translate("Wondershaper settings"))
11 s.anonymous = true
12
13 network = s:option(ListValue, "network", translate("Interface"))
14 luci.tools.webadmin.cbi_add_networks(network)
15
16 uplink = s:option(Value, "uplink", translate("Uplink"), translate("Upstream bandwidth in kbit/s"))
17 uplink.optional = false
18 uplink.datatype = "uinteger"
19 uplink.default = "240"
20
21 uplink = s:option(Value, "downlink", translate("Downlink"), translate("Downstream bandwidth in kbit/s"))
22 uplink.optional = false
23 uplink.datatype = "uinteger"
24 uplink.default = "200"
25
26 nopriohostsrc = s:option(DynamicList, "nopriohostsrc", translate("Low priority hosts (Source)"), translate("Host or Network in CIDR notation."))
27 nopriohostsrc.optional = true
28 nopriohostsrc.datatype = ipaddr
29 nopriohostsrc.placeholder = "10.0.0.1/32"
30
31 nopriohostdst = s:option(DynamicList, "nopriohostdst", translate("Low priority hosts (Destination)"), translate("Host or Network in CIDR notation."))
32 nopriohostdst.optional = true
33 nopriohostdst.datatype = ipaddr
34 nopriohostdst.placeholder = "10.0.0.1/32"
35
36 noprioportsrc = s:option(DynamicList, "noprioportsrc", translate("Low priority source ports"))
37 noprioportsrc.optional = true
38 noprioportsrc.datatype = "range(0,65535)"
39 noprioportsrc.placeholder = "21"
40
41 noprioportdst = s:option(DynamicList, "noprioportdst", translate("Low priority destination ports"))
42 noprioportdst.optional = true
43 noprioportdst.datatype = "range(0,65535)"
44 noprioportdst.placeholder = "21"
45
46 return m