Merge pull request #2424 from LuKePicci/luci-proto-ppp_pppoe_host-uniq
[oweals/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / globalsconfig.lua
1 -- Copyright 2017 Florian Eckert <fe@dev.tdt.de>
2 -- Licensed to the public under the GNU General Public License v2.
3
4 local net = require "luci.model.network".init()
5
6 local s, m, mask, rtmon, rtlookup
7
8 m = Map("mwan3", translate("MWAN - Globals"))
9
10 s = m:section(NamedSection, "globals", "globals", nil)
11
12 mask = s:option(
13         Value,
14         "mmx_mask",
15         translate("Firewall mask"),
16         translate("Enter value in hex, starting with <code>0x</code>"))
17 mask.datatype = "hex(4)"
18 mask.default = "0xff00"
19
20 rtmon = s:option(
21         Value,
22         "rtmon_interval",
23         translate("Update interval"),
24         translate("How often should rtmon update the interface routing table"))
25 rtmon.datatype = "integer"
26 rtmon.default = "5"
27 rtmon:value("1", translatef("%d second", 1))
28 rtmon:value("3", translatef("%d seconds", 3))
29 rtmon:value("5", translatef("%d seconds", 5))
30 rtmon:value("7", translatef("%d seconds", 7))
31 rtmon:value("10", translatef("%d seconds", 10))
32
33 rtlookup = s:option(DynamicList,
34         "rt_table_lookup",
35         translate("Routing table lookup"),
36         translate("Also scan this Routing table for connected networks"))
37 rtlookup.datatype = "integer"
38 rtlookup:value("1", translatef("Routing table %d", 1))
39 rtlookup:value("2", translatef("Routing table %d", 2))
40 rtlookup:value("220", translatef("Routing table %d", 220))
41
42 return m