Suppressing "Database is busy"
This commit is contained in:
@@ -285,8 +285,10 @@ function loadDetectionIfNewExists(previous_detection_identifier=undefined) {
|
|||||||
function loadLeftChart() {
|
function loadLeftChart() {
|
||||||
const xhttp = new XMLHttpRequest();
|
const xhttp = new XMLHttpRequest();
|
||||||
xhttp.onload = function() {
|
xhttp.onload = function() {
|
||||||
|
if(this.responseText.length > 0 && !this.responseText.includes("Database is busy")) {
|
||||||
document.getElementsByClassName("left-column")[0].innerHTML = this.responseText;
|
document.getElementsByClassName("left-column")[0].innerHTML = this.responseText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xhttp.open("GET", "overview.php?ajax_left_chart=true", true);
|
xhttp.open("GET", "overview.php?ajax_left_chart=true", true);
|
||||||
xhttp.send();
|
xhttp.send();
|
||||||
}
|
}
|
||||||
@@ -306,8 +308,10 @@ window.setInterval(function(){
|
|||||||
function loadFiveMostRecentDetections() {
|
function loadFiveMostRecentDetections() {
|
||||||
const xhttp = new XMLHttpRequest();
|
const xhttp = new XMLHttpRequest();
|
||||||
xhttp.onload = function() {
|
xhttp.onload = function() {
|
||||||
|
if(this.responseText.length > 0 && !this.responseText.includes("Database is busy")) {
|
||||||
document.getElementById("detections_table").innerHTML= this.responseText;
|
document.getElementById("detections_table").innerHTML= this.responseText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (window.innerWidth > 500) {
|
if (window.innerWidth > 500) {
|
||||||
xhttp.open("GET", "todays_detections.php?ajax_detections=true&display_limit=undefined&hard_limit=5", true);
|
xhttp.open("GET", "todays_detections.php?ajax_detections=true&display_limit=undefined&hard_limit=5", true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user