auto update admin stats

This commit is contained in:
2020-06-01 14:52:25 +02:00
parent 98503a385b
commit 791320670b

View File

@@ -111,7 +111,10 @@ setData(7, 60);
// Load performance statistics // Load performance statistics
let lastOrder
function getStats(order) { function getStats(order) {
lastOrder = order
fetch(apiEndpoint+"/status").then( fetch(apiEndpoint+"/status").then(
resp => resp.json() resp => resp.json()
).then(resp => { ).then(resp => {
@@ -160,3 +163,5 @@ function getStats(order) {
}) })
} }
getStats("calls") getStats("calls")
setInterval(() => { getStats(lastOrder) }, 5000)