diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 5643ddaf..7dfbef9a 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -5,8 +5,7 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ -/* global utils:false, checkMessages:false, apiFailure:false */ -var token = $("#token").text(); +/* global utils:false, apiFailure:false */ var hostinfoTimer = null; function updateHostInfo() { @@ -71,6 +70,256 @@ function updateCacheInfo() { }); } +function addAllowedValues(allowed) { + if (typeof allowed === "object") { + return ( + "
Available options:
" + option.item + ": " + utils.escapeHtml(option.description);
+ })
+ .join("Allowed value: " + utils.escapeHtml(allowed) + "
"; + } +} + +function generateDNSServers() { + // Build array from multiline string, one item per line + var servers = $("#dns-servers").text().split("\n"); + console.log(servers); +} + +function fillDNSupstreams(value, servers) { + var row = + '| IPv4 | ' + + 'IPv6 | ' + + "Name | " + + "||
|---|---|---|---|---|
| "; + } else { + row += " | "; + } + } + } + + // Build name + row += " | " + element.name + " | "; + }); + // Close table + row += + "||
ECS (Extended Client Subnet) defines a mechanism for recursive resolvers to send partial client IP address information to authoritative DNS name servers. Content Delivery Networks (CDNs) and latency-sensitive services use this to give geo-located responses when responding to name lookups coming through public DNS resolvers. Note that ECS may result in reduced privacy.
" + + " Custom DNS servers can be added by specifying the IP address (and optionally the port number separated by a #) of the server. If the port number is not specified, the default port 53 will be used. The following box contains one server per line:
" +
+ utils.escapeHtml(value.description).replace("\n", "
") +
+ "
' + topic.description + '
\ - \ -" + + topic.description + + "
" + + '' + + "' + utils.escapeHtml(value.description).replace("\n","
") + '
Allowed value: ' + utils.escapeHtml(value.allowed) + '
\ -Available options:
' + option.item + ': ' + utils.escapeHtml(option.description); }).join('