A live bird collage card for your Home Assistant dashboard.
Update update_inprogress.php
Patrick McGuire1208b4346a59
diff --git a/scripts/update_inprogress.php b/scripts/update_inprogress.phpindex f1175831..af6f4d97 100644--- a/scripts/update_inprogress.php+++ b/scripts/update_inprogress.php@@ -1,11 +1,40 @@<?php$timer=60;header( "refresh:$timer;url=/viewdb.php" );-$handle = popen("tail -f /tmp/phpupdate.log", 'r');-while(!feof($handle)) {- $buffer = fgets($handle);- echo "$buffer<br/>\n";- ob_flush();- flush();+?>+<html lang="en">+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <head></head>+ <body style="background-color: rgb(119, 196, 135)">+<script>++function countDown(secs,elem) {++ var element = document.getElementById(elem);++ element.innerHTML = "Update in progress. Please allow another "+secs+" seconds for it to complete.";++ if(secs < 1) {++ clearTimeout(timer);++ element.innerHTML = '<h4>Let\'s see</h4>';++ element.innerHTML += '<a href="http://birdnetpi.local"></a>';++ }++ secs--;++ var timer = setTimeout('countDown('+secs+',"'+elem+'")',1000);+}-pclose($handle);++</script>++<div id="status"style="font-size:30px;"></div>++<script>countDown(<?php echo $timer;?>,"status");</script>+ </body>+</html>