diff --git a/index.php b/index.php index b1d66c3bd..1993be2c2 100644 --- a/index.php +++ b/index.php @@ -90,14 +90,6 @@ - -
@@ -285,8 +277,6 @@
- diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 00ece726a..d562ceb7f 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -255,44 +255,6 @@ $("#pihole-disable-custom").on("click", function (e) { piholeChange("disable", custVal); }); -// Session timer -function updateSessionTimer() { - start = new Date(); - start.setSeconds(start.getSeconds() + sessionvalidity); -} - -var sessionTimerCounter, sessionvalidity, start; - -var sessiontimer = document.getElementById("sessiontimer"); -if (sessiontimer) { - sessionTimerCounter = document.getElementById("sessiontimercounter"); - sessionvalidity = parseInt(sessionTimerCounter.textContent, 10); - start = new Date(); - - if (sessionvalidity > 0) { - // setSeconds will correctly handle wrap-around cases - updateSessionTimer(); - - setInterval(function () { - var current = new Date(); - var totalseconds = (start - current) / 1000; - var minutes = Math.floor(totalseconds / 60); - if (minutes < 10) { - minutes = "0" + minutes; - } - - var seconds = Math.floor(totalseconds % 60); - if (seconds < 10) { - seconds = "0" + seconds; - } - - sessionTimerCounter.textContent = totalseconds > 0 ? minutes + ":" + seconds : "-- : --"; - }, 1000); - } else { - sessiontimer.style.display = "none"; - } -} - // Handle Ctrl + Enter button on Login page $(document).keypress(function (e) { if ((e.keyCode === 10 || e.keyCode === 13) && e.ctrlKey && $("#loginpw").is(":focus")) { diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index b3d7d18a9..b92aa47da 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -5,7 +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, Chart:false, updateSessionTimer:false */ +/* global utils:false, Chart:false */ // Define global variables var timeLineChart, clientsChart; @@ -774,8 +774,6 @@ function updateSummaryData(runOnce) { }; $.getJSON("api.php?summaryRaw", function (data) { - updateSessionTimer(); - if ("FTLnotrunning" in data) { data.dns_queries_today = "Lost"; data.ads_blocked_today = "connection"; diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index a185879c4..be301b6fc 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -38,17 +38,12 @@ - - - - - @@ -57,6 +52,14 @@ + + + + + + + + diff --git a/scripts/pi-hole/php/header_authenticated.php b/scripts/pi-hole/php/header_authenticated.php index 9d03aca42..815f0232f 100644 --- a/scripts/pi-hole/php/header_authenticated.php +++ b/scripts/pi-hole/php/header_authenticated.php @@ -158,6 +158,17 @@ function getTemperature() + + + + +
@@ -171,7 +182,7 @@ function getTemperature()
-