base: status: For odhpcd leases display MAC formatted with colons
[project/luci.git] / applications / luci-app-adblock / luasrc / model / cbi / adblock.lua
1 -- Copyright 2016 Hannu Nyman
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("adblock", translate("Adblock"),
5         translate("Configuration of the adblock package to block ad/abuse domains by using DNS."))
6
7 -- General options
8
9 s = m:section(NamedSection, "global", "adblock", translate("Global options"))
10
11 o1 = s:option(Flag, "adb_enabled", translate("Enable adblock"))
12 o1.rmempty = false
13 o1.default = 0
14
15 o3 = s:option(Value, "adb_whitelist", translate("Whitelist file"),
16      translate("File with whitelisted hosts/domains that are allowed despite being on a blocklist."))
17 o3.rmempty = false
18 o3.datatype = "file"
19
20 -- Blocklist options
21
22 bl = m:section(TypedSection, "source", translate("Blocklist sources"),
23         translate("Available blocklist sources (")
24         .. [[<a href="https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md" target="_blank">]]
25         .. translate("see list details")
26         .. [[</a>]]
27         .. translate("). Note that list URLs and Shallalist category selections are not configurable via Luci."))
28 bl.template = "cbi/tblsection"
29
30 name = bl:option(Flag, "enabled", translate("Enabled"))
31 name.rmempty  = false
32
33 des = bl:option(DummyValue, "adb_src_desc", translate("Description"))
34
35 -- Additional options
36
37 s2 = m:section(NamedSection, "backup", "service", translate("Backup options"))
38
39 o4 = s2:option(Flag, "enabled", translate("Enable blocklist backup"))
40 o4.rmempty = false
41 o4.default = 0
42
43 o5 = s2:option(Value, "adb_dir", translate("Backup directory"))
44 o5.rmempty = false
45 o5.datatype = "directory"
46
47 -- Extra options
48
49 e = m:section(NamedSection, "global", "adblock", translate("Extra options"),
50         translate("Options for further tweaking in case the defaults are not suitable for you."))
51
52 a = e:option(Flag, "adb_debug", translate("Enable verbose debug logging"))
53 a.default = a.disabled
54 a.rmempty = false
55
56 a = e:option(Value, "adb_iface", translate("Restrict reload trigger to certain interface(s)"),
57         translate("Space separated list of wan interfaces that trigger reload action. " ..
58                 "To disable reload trigger set it to 'false'. Default: empty"))
59 a.datatype = "network"
60 a.rmempty = true
61
62 return m
63