luci-app-adblock: sync with adblock 2.8.5 1277/head
authorDirk Brenken <dev@brenken.org>
Fri, 4 Aug 2017 06:34:34 +0000 (08:34 +0200)
committerDirk Brenken <dev@brenken.org>
Fri, 4 Aug 2017 09:12:03 +0000 (11:12 +0200)
* add preliminary kresd support
* small fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-adblock/luasrc/controller/adblock.lua
applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua
applications/luci-app-adblock/luasrc/model/cbi/adblock/configuration_tab.lua
applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua

index 03b9fc20eb88b7baa4263470e3f8eab5dd5cfd7d..efa99b5b89de91ad16948bc1d703cc1aee2ad1d1 100644 (file)
@@ -5,7 +5,7 @@ module("luci.controller.adblock", package.seeall)
 
 local fs = require("nixio.fs")
 local util = require("luci.util")
-local template = require("luci.template")
+local templ = require("luci.template")
 local i18n = require("luci.i18n")
 
 function index()
@@ -19,17 +19,13 @@ function index()
        entry({"admin", "services", "adblock", "advanced", "blacklist"}, cbi("adblock/blacklist_tab"), _("Edit Blacklist"), 110).leaf = true
        entry({"admin", "services", "adblock", "advanced", "whitelist"}, cbi("adblock/whitelist_tab"), _("Edit Whitelist"), 120).leaf = true
        entry({"admin", "services", "adblock", "advanced", "configuration"}, cbi("adblock/configuration_tab"), _("Edit Configuration"), 130).leaf = true
-       entry({"admin", "services", "adblock", "advanced", "query"}, call("query"), _("Query domains"), 140).leaf = true
+       entry({"admin", "services", "adblock", "advanced", "query"}, template("adblock/query"), _("Query domains"), 140).leaf = true
        entry({"admin", "services", "adblock", "advanced", "result"}, call("queryData"), nil, 150).leaf = true
 end
 
 function logread()
        local logfile = util.trim(util.exec("logread -e 'adblock'"))
-       template.render("adblock/logread", {title = i18n.translate("Adblock Logfile"), content = logfile})
-end
-
-function query()
-       template.render("adblock/query", {title = i18n.translate("Adblock Domain Query")})
+       templ.render("adblock/logread", {title = i18n.translate("Adblock Logfile"), content = logfile})
 end
 
 function queryData(domain)
index 59cd1e80fa7e67d73e45755b42422d57a4013d60..ef70100e4f0b42a2509d378a9929ed4a0b49f230 100644 (file)
@@ -25,6 +25,7 @@ end
 
 m = SimpleForm("input", nil)
 m:append(Template("adblock/config_css"))
+m.submit = translate("Save")
 m.reset = false
 
 s = m:section(SimpleSection, nil,
index 1607f1440a6c959f4fd927d62138487102f977fe..1d89485e7983995cf7740a8a2cae2d8f7c44efc4 100644 (file)
@@ -14,6 +14,7 @@ end
 
 m = SimpleForm("input", nil)
 m:append(Template("adblock/config_css"))
+m.submit = translate("Save")
 m.reset = false
 
 s = m:section(SimpleSection, nil,
index 68f9c8897eaf78e9d3df1c75e6b006dccd64a939..aa57014879485adf3964e6e8872142e4dc19c8fb 100644 (file)
@@ -21,6 +21,8 @@ if parse ~= nil then
                        dnspath = "/var/lib/unbound"
                elseif backend == "named" then
                        dnspath = "/var/lib/bind"
+               elseif backend == "kresd" then
+                       dnspath = "/tmp/kresd"
                end
        end
 end
@@ -180,7 +182,7 @@ e2 = e:option(Flag, "adb_forcesrt", translate("Force Overall Sort"),
 e2.default = e2.disabled
 e2.rmempty = false
 
-e3 = e:option(Flag, "adb_manmode", translate("Manual mode"),
+e3 = e:option(Flag, "adb_manmode", translate("Manual / Backup mode"),
        translate("Do not automatically update blocklists during startup, use blocklist backups instead."))
 e3.default = e3.disabled
 e3.rmempty = false
index 10a593859f5599e516560afc3144ca8e19f7b873..a3659eb469d10530565313b575e4360f6e0ae7c5 100644 (file)
@@ -24,6 +24,7 @@ end
 
 m = SimpleForm("input", nil)
 m:append(Template("adblock/config_css"))
+m.submit = translate("Save")
 m.reset = false
 
 s = m:section(SimpleSection, nil,