diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 20866b85..e6c3c157 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -144,6 +144,7 @@ $("#pihole-disable-custom").on("click", function(e){ var piholeVersion = $("#piholeVersion").html(); var webVersion = $("#webVersion").html(); +var FTLVersion = $("#FTLVersion").html(); // Credit for following function: https://gist.github.com/alexey-bass/1115557 // Modified to discard any possible "v" in the string @@ -183,17 +184,24 @@ function versionCompare(left, right) { $.getJSON("https://api.github.com/repos/pi-hole/pi-hole/releases/latest", function(json) { if(versionCompare(piholeVersion, json.tag_name.slice(1)) < 0) { // Alert user - $("#piholeVersion").html($("#piholeVersion").text() + "(Update available!)"); + $("#piholeVersion").html($("#piholeVersion").text() + " (Update available!)"); $("#alPiholeUpdate").show(); } }); $.getJSON("https://api.github.com/repos/pi-hole/AdminLTE/releases/latest", function(json) { if(versionCompare(webVersion, json.tag_name.slice(1)) < 0) { // Alert user - $("#webVersion").html($("#webVersion").text() + "(Update available!)"); + $("#webVersion").html($("#webVersion").text() + " (Update available!)"); $("#alWebUpdate").show(); } }); +$.getJSON("https://api.github.com/repos/pi-hole/FTL/releases/latest", function(json) { + if(versionCompare(FTLVersion, json.tag_name.slice(1)) < 0) { + // Alert user + $("#FTLVersion").html($("#FTLVersion").text() + " (Update available!)"); + $("#alFTLUpdate").show(); + } +}); /* * Make sure that Pi-hole is updated to at least v2.7, since that is needed to use the sudo diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 7230e27a..d773aefc 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -392,7 +392,14 @@ function updateSummaryData(runOnce) { }, 500); }).done(function() { - setTimer(1); + if(!FTLoffline) + { + setTimer(1); + } + else + { + setTimer(10); + } }).fail(function() { setTimer(300); }); diff --git a/scripts/pi-hole/php/footer.php b/scripts/pi-hole/php/footer.php index 34d7319f..50ebc210 100644 --- a/scripts/pi-hole/php/footer.php +++ b/scripts/pi-hole/php/footer.php @@ -62,10 +62,25 @@ else { $webVersion = exec("git describe --tags --abbrev=0"); } + + $FTLVersion = exec("pihole-FTL version"); ?> +
Donate if you found this useful.