1 -- Copyright 2016 Hannu Nyman
2 -- Licensed to the public under the Apache License 2.0.
4 m = Map("adblock", translate("Adblock"),
5 translate("Configuration of the adblock package to block ad/abuse domains by using DNS."))
9 s = m:section(NamedSection, "global", "adblock", translate("Global options"))
11 o1 = s:option(Flag, "adb_enabled", translate("Enable adblock"))
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."))
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")
27 .. translate("). Note that list URLs and Shallalist category selections are not configurable via Luci."))
28 bl.template = "cbi/tblsection"
30 name = bl:option(Flag, "enabled", translate("Enabled"))
33 des = bl:option(DummyValue, "adb_src_desc", translate("Description"))
37 s2 = m:section(NamedSection, "global", "adblock", translate("Backup options"))
39 o4 = s2:option(Flag, "adb_backup", translate("Enable blocklist backup"))
43 o5 = s2:option(Value, "adb_backupdir", translate("Backup directory"))
45 o5.datatype = "directory"
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."))
52 a = e:option(Flag, "adb_debug", translate("Enable verbose debug logging"))
53 a.default = a.disabled
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"