Port PHP to Lua Pages

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-04-26 21:57:11 +02:00
parent fb64759fdf
commit 7156cc541f
37 changed files with 458 additions and 463 deletions

View File

@@ -87,6 +87,24 @@ function updateMetrics() {
});
}
function showQueryLoggingButton() {
$.ajax({
url: "/api/config/dns/queryLogging",
})
.done(function (data) {
if (data.config.dns.queryLogging) {
$("#disableLoggingButton").show();
$("#enableLoggingButton").hide();
} else {
$("#disableLoggingButton").hide();
$("#enableLoggingButton").show();
}
})
.fail(function (data) {
apiFailure(data);
});
}
$(".confirm-poweroff").confirm({
text: "Are you sure you want to send a poweroff command to your Pi-hole?",
title: "Confirmation required",
@@ -191,4 +209,5 @@ $(".confirm-disablelogging-noflush").confirm({
$(function () {
updateHostInfo();
updateMetrics();
showQueryLoggingButton();
});