update automatically

This commit is contained in:
Evert Prants 2019-03-04 21:39:24 +02:00
parent 358bdb7de8
commit 6c9056f3e7
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -1,5 +1,6 @@
(function () {
let app = document.getElementById('app')
let refreshTimer
function httpGet (url) {
let request = new XMLHttpRequest()
@ -87,7 +88,7 @@
e('span', data.hostname)
) + box('row',
e('label', 'Uptime') +
e('span', readableTime(data.uptime))
e('span', readableTime(data.uptime, true))
) + box('row',
e('label', 'Kernel version') +
e('span', data.kernel)
@ -204,4 +205,5 @@
}
update()
refreshTimer = setInterval(update, 5000)
})()