update automatically
This commit is contained in:
parent
358bdb7de8
commit
6c9056f3e7
@ -1,5 +1,6 @@
|
|||||||
(function () {
|
(function () {
|
||||||
let app = document.getElementById('app')
|
let app = document.getElementById('app')
|
||||||
|
let refreshTimer
|
||||||
|
|
||||||
function httpGet (url) {
|
function httpGet (url) {
|
||||||
let request = new XMLHttpRequest()
|
let request = new XMLHttpRequest()
|
||||||
@ -87,7 +88,7 @@
|
|||||||
e('span', data.hostname)
|
e('span', data.hostname)
|
||||||
) + box('row',
|
) + box('row',
|
||||||
e('label', 'Uptime') +
|
e('label', 'Uptime') +
|
||||||
e('span', readableTime(data.uptime))
|
e('span', readableTime(data.uptime, true))
|
||||||
) + box('row',
|
) + box('row',
|
||||||
e('label', 'Kernel version') +
|
e('label', 'Kernel version') +
|
||||||
e('span', data.kernel)
|
e('span', data.kernel)
|
||||||
@ -204,4 +205,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
update()
|
update()
|
||||||
|
refreshTimer = setInterval(update, 5000)
|
||||||
})()
|
})()
|
||||||
|
Reference in New Issue
Block a user