|
|
@ -1,9 +1,16 @@
|
|
|
|
(function () {
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
var last_timestamp;
|
|
|
|
|
|
|
|
|
|
|
|
async function poll () {
|
|
|
|
async function poll () {
|
|
|
|
var d = await (await fetch("/cgi-bin/radioimplicancies.cgi")).json();
|
|
|
|
var rows = await (await fetch("/cgi-bin/radioimplicancies.cgi")).json();
|
|
|
|
console.log("d", d);
|
|
|
|
console.log("rows", rows);
|
|
|
|
|
|
|
|
if (rows) {
|
|
|
|
|
|
|
|
// get the last (most recent) item
|
|
|
|
|
|
|
|
var d = rows[rows.length-1];
|
|
|
|
|
|
|
|
if (d.time && d.time != last_timestamp) {
|
|
|
|
|
|
|
|
console.log("CURRENT METADATA", d);
|
|
|
|
|
|
|
|
last_timestamp = d.time;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
window.setInterval(poll, 5000);
|
|
|
|
window.setInterval(poll, 5000);
|
|
|
|