Add option to disable logging without flushing logs (for temporary disabling without wanting to nuke the logs).

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-01-18 17:09:20 +01:00
parent 5140baa8f5
commit 78f6cb3751
3 changed files with 38 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ $(".confirm-flushlogs").confirm({
});
$(".confirm-disablelogging").confirm({
text: "Note that disabling query logging will render graphs on the web user interface useless. Are you sure you want to disable your logging?",
text: "Note that disabling query logging will render graphs on the web user interface useless. Are you sure you want to disable logging and flush your Pi-hole logs?",
title: "Confirmation required",
confirm(button) {
$("#disablelogsform").submit();
@@ -93,7 +93,7 @@ $(".confirm-disablelogging").confirm({
cancel(button) {
// nothing to do
},
confirmButton: "Yes, disable logs",
confirmButton: "Yes, disable logs and flush my logs",
cancelButton: "No, go back",
post: true,
confirmButtonClass: "btn-danger",
@@ -101,6 +101,23 @@ $(".confirm-disablelogging").confirm({
dialogClass: "modal-dialog modal-mg"
});
$(".confirm-disablelogging-noflush").confirm({
text: "Note that disabling query logging will render graphs on the web user interface useless after this point. Are you sure you want to disable logging?",
title: "Confirmation required",
confirm(button) {
$("#disablelogsform-noflush").submit();
},
cancel(button) {
// nothing to do
},
confirmButton: "Yes, disable logs",
cancelButton: "No, go back",
post: true,
confirmButtonClass: "btn-warning",
cancelButtonClass: "btn-success",
dialogClass: "modal-dialog modal-mg"
});
$(".api-token").confirm({
text: "Make sure that nobody else can scan this code around you. They will have full access to the API without having to know the password. Note that the generation of the QR code will take some time.",
title: "Confirmation required",