Merge branch 'BirdNET-pi-main' into New-UI-API
This commit is contained in:
@@ -317,6 +317,7 @@ foreach($audio_formats as $format){
|
||||
<table class="settingstable"><tr><td>
|
||||
<h2>BirdNET-Pi Password</h2>
|
||||
<p>This password will protect your "Tools" page and "Live Audio" stream.</p>
|
||||
<p>Do NOT use special characters. Accepted characters: [A-Z0-9a-z]</p>
|
||||
<label for="caddy_pwd">Password: </label>
|
||||
<input style="width:40ch" name="caddy_pwd" id="caddy_pwd" type="password" pattern="[A-Za-z0-9]+" title="Password must be alphanumeric (A-Z, 0-9)" value="<?php print($newconfig['CADDY_PWD']);?>" /><span id="showpassword" onmouseover="document.getElementById('caddy_pwd').type='text';" onmouseout="document.getElementById('caddy_pwd').type='password';">show</span><br>
|
||||
</td></tr></table><br>
|
||||
|
||||
@@ -404,6 +404,7 @@ window.setInterval(function(){
|
||||
</style>
|
||||
<script>
|
||||
function generateMiniGraph(elem, comname) {
|
||||
|
||||
// Make an AJAX call to fetch the number of detections for the bird species
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/todays_detections.php?comname=' + comname);
|
||||
@@ -411,9 +412,10 @@ function generateMiniGraph(elem, comname) {
|
||||
if (xhr.status === 200) {
|
||||
var detections = JSON.parse(xhr.responseText);
|
||||
|
||||
console.log(detections)
|
||||
|
||||
// Create a div element for the chart window
|
||||
if (typeof(window.chartWindow) != 'undefined') {
|
||||
document.body.removeChild(window.chartWindow);
|
||||
}
|
||||
var chartWindow = document.createElement('div');
|
||||
chartWindow.className = "chartdiv"
|
||||
chartWindow.style.position = 'fixed';
|
||||
@@ -524,6 +526,7 @@ function generateMiniGraph(elem, comname) {
|
||||
document.body.removeChild(chartWindow);
|
||||
});
|
||||
chartWindow.appendChild(closeButton);
|
||||
window.chartWindow = chartWindow;
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
@@ -540,4 +543,4 @@ window.addEventListener('scroll', function() {
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -462,9 +462,10 @@ function generateMiniGraph(elem, comname) {
|
||||
if (xhr.status === 200) {
|
||||
var detections = JSON.parse(xhr.responseText);
|
||||
|
||||
console.log(detections)
|
||||
|
||||
// Create a div element for the chart window
|
||||
if (typeof(window.chartWindow) != 'undefined') {
|
||||
document.body.removeChild(window.chartWindow);
|
||||
}
|
||||
var chartWindow = document.createElement('div');
|
||||
chartWindow.className = "chartdiv"
|
||||
chartWindow.style.position = 'fixed';
|
||||
@@ -575,6 +576,7 @@ function generateMiniGraph(elem, comname) {
|
||||
document.body.removeChild(chartWindow);
|
||||
});
|
||||
chartWindow.appendChild(closeButton);
|
||||
window.chartWindow = chartWindow;
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
|
||||
Reference in New Issue
Block a user