luci/po: spelling and grammar fixes by Alex Henrie
[project/luci.git] / applications / luci-wshaper / luasrc / model / cbi / wshaper.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11 ]]--
12
13 require("luci.tools.webadmin")
14
15 m = Map("wshaper", translate("Wondershaper"),
16         translate("Wondershaper shapes traffic to ensure low latencies for interactive traffic even when your " ..
17         "internet connection is highly saturated."))
18
19 s = m:section(NamedSection, "settings", "wshaper", translate("Wondershaper settings"))
20 s.anonymous = true
21
22 network = s:option(ListValue, "network", translate("Interface"))
23 luci.tools.webadmin.cbi_add_networks(network)
24
25 uplink = s:option(Value, "uplink", translate("Uplink"), translate("Upstream bandwidth in kbit/s"))
26 uplink.optional = false
27 uplink.datatype = "uinteger"
28 uplink.default = "240"
29
30 uplink = s:option(Value, "downlink", translate("Downlink"), translate("Downstream bandwidth in kbit/s"))
31 uplink.optional = false
32 uplink.datatype = "uinteger"
33 uplink.default = "200"
34
35 nopriohostsrc = s:option(DynamicList, "nopriohostsrc", translate("Low priority hosts (Source)"), translate("Host or Network in CIDR notation."))
36 nopriohostsrc.optional = true
37 nopriohostsrc.datatype = ipaddr
38 nopriohostsrc.placeholder = "10.0.0.1/32"
39
40 nopriohostdst = s:option(DynamicList, "nopriohostdst", translate("Low priority hosts (Destination)"), translate("Host or Network in CIDR notation."))
41 nopriohostdst.optional = true
42 nopriohostdst.datatype = ipaddr
43 nopriohostdst.placeholder = "10.0.0.1/32"
44
45 noprioportsrc = s:option(DynamicList, "noprioportsrc", translate("Low priority source ports"))
46 noprioportsrc.optional = true
47 noprioportsrc.datatype = "range(0,65535)"
48 noprioportsrc.placeholder = "21"
49
50 noprioportdst = s:option(DynamicList, "noprioportdst", translate("Low priority destination ports"))
51 noprioportdst.optional = true
52 noprioportdst.datatype = "range(0,65535)"
53 noprioportdst.placeholder = "21"
54
55 return m