summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-adblock')
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua54
1 files changed, 35 insertions, 19 deletions
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
index 4bb404c25c..d0453f7d96 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
@@ -74,7 +74,7 @@ end
o2 = s:option(ListValue, "adb_dns", translate("DNS Backend (DNS Directory)"),
translate("List of supported DNS backends with their default list export directory.<br />")
.. translate("To overwrite the default path use the 'DNS Directory' option in the extra section below."))
-o2:value("dnsmasq", "dnsmasq (/tmp/dnsmasq.d)")
+o2:value("dnsmasq", "dnsmasq (/tmp)")
o2:value("unbound", "unbound (/var/lib/unbound)")
o2:value("named", "named (/var/lib/bind)")
o2:value("kresd", "kresd (/etc/kresd)")
@@ -98,10 +98,9 @@ o3.rmempty = false
-- Runtime information
-ds = s:option(DummyValue, "", translate("Runtime Information"))
-ds.template = "cbi/nullsection"
+ds = m:section(NamedSection, "global", "adblock", translate("Runtime Information"))
-dv1 = s:option(DummyValue, "", translate("Adblock Status"))
+dv1 = ds:option(DummyValue, "", translate("Adblock Status"))
dv1.template = "adblock/runtime"
if parse == nil then
dv1.value = translate("n/a")
@@ -117,7 +116,7 @@ else
end
end
-dv2 = s:option(DummyValue, "", translate("Adblock Version"))
+dv2 = ds:option(DummyValue, "", translate("Adblock Version"))
dv2.template = "adblock/runtime"
if parse == nil then
dv2.value = translate("n/a")
@@ -125,7 +124,7 @@ else
dv2.value = version
end
-dv3 = s:option(DummyValue, "", translate("Download Utility (SSL Library)"),
+dv3 = ds:option(DummyValue, "", translate("Download Utility (SSL Library)"),
translate("For SSL protected blocklist sources you need a suitable SSL library, e.g. 'libustream-ssl' or the wget 'built-in'."))
dv3.template = "adblock/runtime"
if parse == nil then
@@ -134,7 +133,7 @@ else
dv3.value = fetch
end
-dv4 = s:option(DummyValue, "", translate("DNS Backend (DNS Directory)"))
+dv4 = ds:option(DummyValue, "", translate("DNS Backend (DNS Directory)"))
dv4.template = "adblock/runtime"
if parse == nil then
dv4.value = translate("n/a")
@@ -142,7 +141,7 @@ else
dv4.value = backend
end
-dv5 = s:option(DummyValue, "", translate("Overall Domains"))
+dv5 = ds:option(DummyValue, "", translate("Overall Domains"))
dv5.template = "adblock/runtime"
if parse == nil then
dv5.value = translate("n/a")
@@ -150,7 +149,7 @@ else
dv5.value = domains
end
-dv6 = s:option(DummyValue, "", translate("Last Run"))
+dv6 = ds:option(DummyValue, "", translate("Last Run"))
dv6.template = "adblock/runtime"
if parse == nil then
dv6.value = translate("n/a")
@@ -223,20 +222,37 @@ e7 = e:option(Flag, "adb_whitelist_mode", translate("Whitelist Mode"),
e7.default = e7.disabled
e7.rmempty = true
-e8 = e:option(Value, "adb_dnsdir", translate("DNS Directory"),
+e8 = e:option(Flag, "adb_dnsflush", translate("Flush DNS Cache"),
+ translate("Flush DNS Cache after adblock processing."))
+e8.default = e8.disabled
+e8.rmempty = true
+
+e9 = e:option(Flag, "adb_notify", translate("Email Notification"),
+ translate("Send notification emails in case of a processing error or if domain count is &le; 0.<br />")
+ .. translate("Please note: this needs additional 'mstmp' installation and setup (see readme)."))
+e9.default = e9.disabled
+e9.rmempty = true
+
+e10 = e:option(Value, "adb_notifycnt", translate("Email Notification Count"),
+translate("Raise minimum domain count email notification trigger, to get emails if the overall count is &le; the given limit (default 0)."))
+e10.default = 0
+e10.datatype = "min(0)"
+e10.optional = true
+
+e11 = e:option(Value, "adb_dnsdir", translate("DNS Directory"),
translate("Target directory for the generated blocklist 'adb_list.overall'."))
-e8.datatype = "directory"
-e8.optional = true
+e11.datatype = "directory"
+e11.optional = true
-e9 = e:option(Value, "adb_whitelist", translate("Whitelist File"),
+e12 = e:option(Value, "adb_whitelist", translate("Whitelist File"),
translate("Full path to the whitelist file."))
-e9.datatype = "file"
-e9.default = "/etc/adblock/adblock.whitelist"
-e9.optional = true
+e12.datatype = "file"
+e12.default = "/etc/adblock/adblock.whitelist"
+e12.optional = true
-e10 = e:option(Value, "adb_triggerdelay", translate("Trigger Delay"),
+e13 = e:option(Value, "adb_triggerdelay", translate("Trigger Delay"),
translate("Additional trigger delay in seconds before adblock processing begins."))
-e10.datatype = "range(1,60)"
-e10.optional = true
+e13.datatype = "range(1,60)"
+e13.optional = true
return m