Update stat.js to use new meta database format
This commit is contained in:
parent
a3fdda62d4
commit
c7b2813a3c
@ -129,4 +129,10 @@ async function vibe(type) {
|
|||||||
default:
|
default:
|
||||||
navigator.vibrate(30)
|
navigator.vibrate(30)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function convertUnixLocal(unix) {
|
||||||
|
var jsTime = unix*1000
|
||||||
|
var dt = new Date(jsTime)
|
||||||
|
return dt.toLocaleString()
|
||||||
}
|
}
|
@ -14,7 +14,7 @@ async function display(data) {
|
|||||||
document.getElementById('server_host').textContent = `HOST: ${data.host}`;
|
document.getElementById('server_host').textContent = `HOST: ${data.host}`;
|
||||||
let dat = data.dat[0]
|
let dat = data.dat[0]
|
||||||
console.log(JSON.stringify(dat))
|
console.log(JSON.stringify(dat))
|
||||||
document.getElementById('time').textContent = dat.since;
|
document.getElementById('time').textContent = convertUnixLocal(dat.since);
|
||||||
document.getElementById('ldbws').textContent = dat.ldbws || "0";
|
document.getElementById('ldbws').textContent = dat.ldbws || "0";
|
||||||
document.getElementById('ldbsvws').textContent = dat.ldbsvws || "0";
|
document.getElementById('ldbsvws').textContent = dat.ldbsvws || "0";
|
||||||
document.getElementById('corpus').textContent = dat.corpus || "0";
|
document.getElementById('corpus').textContent = dat.corpus || "0";
|
||||||
|
Reference in New Issue
Block a user