T272 history loads last 24h upon click

This commit is contained in:
2021-04-23 13:53:29 +02:00
parent 98dd081e02
commit 56b55518fd
6 changed files with 38 additions and 2 deletions

View File

@@ -52,6 +52,13 @@ function loadHistory(dateFrom, dateTo){
});
}
function getLast24hHistoryData(){
$.getJSON(host + '/api/event/' + clientUUID + '/' + lastId, function(data){
historyJson = data;
displayHistory();
});
}
function historyToHtml(){
var innerHTML = '';
var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations;