From 58a6de6daf8d343de9e6144a438a8d9e0296e041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 28 Jul 2023 23:05:20 +0200 Subject: [PATCH] Remove shutdown and reboot button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/js/settings-system.js | 50 --------------------------- settings-system.lp | 22 ++++-------- 2 files changed, 7 insertions(+), 65 deletions(-) diff --git a/scripts/pi-hole/js/settings-system.js b/scripts/pi-hole/js/settings-system.js index 5f6eaa59..a7f8b425 100644 --- a/scripts/pi-hole/js/settings-system.js +++ b/scripts/pi-hole/js/settings-system.js @@ -202,56 +202,6 @@ function getLoggingButton() { }); } -$(".confirm-poweroff").confirm({ - text: - "Are you sure you want to send a poweroff command to your Pi-hole?

" + - "This will shut down your Pi-hole and power it off.
" + - "You will not be able to access the web interface or use any Pi-hole functionality until you manually power it back on.", - title: "Confirmation required", - confirm: function () { - $.ajax({ - url: "/api/action/poweroff", - type: "POST", - }).fail(function (data) { - apiFailure(data); - }); - }, - cancel: function () { - // nothing to do - }, - confirmButton: "Yes, shutdown and poweroff the Pi-hole now", - cancelButton: "No, go back", - post: true, - confirmButtonClass: "btn-danger", - cancelButtonClass: "btn-success", - dialogClass: "modal-dialog", -}); - -$(".confirm-reboot").confirm({ - text: - "Are you sure you want to send a reboot command to your Pi-hole?

" + - "This will reboot your Pi-hole.
" + - "You will not be able to access the web interface or use any Pi-hole functionality until it has finished rebooting.", - title: "Confirmation required", - confirm: function () { - $.ajax({ - url: "/api/action/reboot", - type: "POST", - }).fail(function (data) { - apiFailure(data); - }); - }, - cancel: function () { - // nothing to do - }, - confirmButton: "Yes, reboot the Pi-hole now", - cancelButton: "No, go back", - post: true, - confirmButtonClass: "btn-danger", - cancelButtonClass: "btn-success", - dialogClass: "modal-dialog", -}); - $(".confirm-restartdns").confirm({ text: "Are you sure you want to send a restart command to your DNS server?

" + diff --git a/settings-system.lp b/settings-system.lp index 31647f3d..a474758b 100644 --- a/settings-system.lp +++ b/settings-system.lp @@ -282,25 +282,17 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
-
+
-
- +
+
-
- +
+
-
- -
- -
- -
- -
- +
+