diff options
author | Stan Grishin <stangri@melmac.net> | 2020-12-21 11:34:24 -0600 |
---|---|---|
committer | Stan Grishin <stangri@melmac.net> | 2020-12-21 11:34:24 -0600 |
commit | 4f0506e3e9c99221ae1c2357bdc41b753960d599 (patch) | |
tree | c369e350802499bd8ce0e4750c056ef89b237c39 /applications/luci-app-https-dns-proxy/luasrc/model | |
parent | 4f1f5cfb6c240ef29c90beebe9856aa669a0e0ef (diff) |
luci-app-https-dns-proxy: WebUI for dnsmasq config update, quad9 bootstrap IPv6
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-https-dns-proxy/luasrc/model')
-rw-r--r-- | applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua b/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua index 4fdaf26a00..8842909c8c 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua @@ -6,6 +6,7 @@ local i18n = require "luci.i18n" local uci = require("luci.model.uci").cursor() local packageName = "https-dns-proxy" +local readmeURL = "https://docs.openwrt.melmac.net/" .. packageName .. "/" local providers_dir = "/usr/lib/lua/luci/" .. packageName .. "/providers/" local helperText = "" @@ -24,7 +25,7 @@ function getPackageVersion() end function createHelperText() - local initText = "<br />" .. translate("For more information on different options check") .. " " + local initText = translate("For more information on different options check") .. " " for filename in fs.dir(providers_dir) do local p_func = loadfile(providers_dir .. filename) setfenv(p_func, { _ = i18n.translate }) @@ -122,9 +123,20 @@ else buttons.template = packageName .. "/buttons" end +c = m:section(NamedSection, "config", "https-dns-proxy", translate("Configuration"), translatef("If update DNSMASQ config is selected, when you add/remove any instances below, they will be used to override the 'DNS forwardings' section of %sDHCP and DNS%s (%smore information%s).", "<a href=\"" .. dispatcher.build_url("admin/network/dhcp") .. "\">", "</a>", "<a href=\"" .. readmeURL .. "#default-settings" .. "\" target=\"_blank\">", "</a>")) +d1 = c:option(ListValue, "update_dnsmasq_config", translate("Update DNSMASQ Config on Start/Stop")) +d1:value('*', translate("Update all configs")) +local dnsmasq_num = 0 +uci:foreach("dhcp", "dnsmasq", function(s) +d1:value(tostring(dnsmasq_num), translatef("Update %s config", "dhcp.@dnsmasq[" .. tostring(dnsmasq_num) .. "]")) +dnsmasq_num = dnsmasq_num + 1 +end) +d1:value('-', translate("Do not update configs")) +d1.default = '*' + createHelperText() s3 = m:section(TypedSection, "https-dns-proxy", translate("Instances"), - translatef("When you add/remove any instances below, they will be used to override the 'DNS forwardings' section of %sDHCP and DNS%s.", "<a href=\"" .. dispatcher.build_url("admin/network/dhcp") .. "\">", "</a>") .. helperText) + helperText) s3.template = "cbi/tblsection" s3.sortable = false s3.anonymous = true |