update
This commit is contained in:
parent
c084648b9b
commit
8bab30364b
@ -55,17 +55,17 @@
|
|||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
// console.table(data)
|
// console.table(data)
|
||||||
zhao_temp.innerText = data.cpu.temperature
|
zhao_temp.innerText = data.cpu.temperature.toFixed(2)
|
||||||
zhao_cpu.innerText = (data.cpu.load * 100).toFixed(2)
|
zhao_cpu.innerText = (data.cpu.load * 100).toFixed(2)
|
||||||
zhao_mem.innerText = data.memory.available
|
zhao_mem.innerText = data.memory.available.toFixed(2)
|
||||||
})
|
})
|
||||||
fetch(new Request('http://pi:4000'))
|
fetch(new Request('http://pi:4000'))
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
// console.table(data)
|
// console.table(data)
|
||||||
pi_temp.innerText = data.cpu.temperature
|
pi_temp.innerText = data.cpu.temperature.toFixed(2)
|
||||||
pi_cpu.innerText = (data.cpu.load * 100).toFixed(2)
|
pi_cpu.innerText = (data.cpu.load * 100).toFixed(2)
|
||||||
pi_mem.innerText = data.memory.available
|
pi_mem.innerText = data.memory.available.toFixed(2)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
setInterval(getinfo, 1000)
|
setInterval(getinfo, 1000)
|
||||||
|
Loading…
Reference in New Issue
Block a user