From e2062362b832823ab0e41f12559aa636a612e8e7 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Thu, 12 Jan 2023 18:04:15 -0500 Subject: [PATCH 1/2] Update todays_detections.php --- scripts/todays_detections.php | 64 ++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php index db87185..558bba5 100644 --- a/scripts/todays_detections.php +++ b/scripts/todays_detections.php @@ -280,6 +280,34 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) { die(); } +if(isset($_GET['today_stats'])) { + ?> + + + + + + + + + + + + + + + + + + + + + +
TotalTodayLast HourUnique Species TotalUnique Species Today
+ @@ -322,28 +350,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) { }

Number of Detections

- - - - - - - - - - - - - - - - - - - - - -
TotalTodayLast HourUnique Species TotalUnique Species Today
+

Today's Detections

@@ -440,14 +447,25 @@ function loadDetections(detections_limit, element=undefined) { } xhttp.send(); } +function refreshTodayStats() { + const xhttp = new XMLHttpRequest(); + xhttp.onload = function() { + if(this.responseText.length > 0 && !this.responseText.includes("Database is busy")) { + document.getElementById("todaystats").innerHTML = this.responseText; + } + } + xhttp.open("GET", "todays_detections.php?today_stats=true", true); + xhttp.send(); +} window.addEventListener("load", function(){ document.getElementById("myTopnav").remove(); loadDetections(undefined); + refreshTodayStats(); // refresh the kiosk detection list every minute setTimeout(function() { loadDetections(undefined); - document.getElementById("searchterm").blur(); + refreshTodayStats(); }, 60000); loadDetections(40); From 2cc4dbac6a44679879b98f3d4323345de4fa96c9 Mon Sep 17 00:00:00 2001 From: Patrick McGuire <60325264+mcguirepr89@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:50:03 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c965614..8c6c5a6 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Currently listening in these countries . . . that I know of . . . - Hungary - South Sudan - Argentina +- Brazil ## Features * 24/7 recording and BirdNET-Lite analysis