update
This commit is contained in:
parent
23bda5469e
commit
4b16fcd6fb
@ -158,7 +158,7 @@ block main
|
|||||||
p.card-text
|
p.card-text
|
||||||
| 内存剩余:
|
| 内存剩余:
|
||||||
code#zhao_mem
|
code#zhao_mem
|
||||||
| MB
|
| 字节
|
||||||
.col(style="min-width:15rem;")
|
.col(style="min-width:15rem;")
|
||||||
.card.border-danger
|
.card.border-danger
|
||||||
.card-header
|
.card-header
|
||||||
@ -179,21 +179,21 @@ block main
|
|||||||
p.card-text
|
p.card-text
|
||||||
| 内存剩余:
|
| 内存剩余:
|
||||||
code#pi_mem
|
code#pi_mem
|
||||||
| MB
|
| 字节
|
||||||
script.
|
script.
|
||||||
function get_rpis_status() {
|
function get_rpis_status() {
|
||||||
fetch(new Request('http://zhao/status'))
|
fetch(new Request('http://zhao/status'))
|
||||||
.then(resp => resp.json())
|
.then(resp => resp.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
zhao_temp.innerText = data.cpu.temperature.toFixed(2)
|
zhao_temp.innerText = data.cpu.temperature.toFixed(2)
|
||||||
zhao_cpu.innerText = (data.cpu.load * 100).toFixed(2)
|
zhao_cpu.innerText = (data.cpu.load).toFixed(2)
|
||||||
zhao_mem.innerText = data.memory.available.toFixed(2)
|
zhao_mem.innerText = data.memory.available.toFixed(2)
|
||||||
})
|
})
|
||||||
fetch(new Request('http://pi/status'))
|
fetch(new Request('http://pi/status'))
|
||||||
.then(resp => resp.json())
|
.then(resp => resp.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
pi_temp.innerText = data.cpu.temperature.toFixed(2)
|
pi_temp.innerText = data.cpu.temperature.toFixed(2)
|
||||||
pi_cpu.innerText = (data.cpu.load * 100).toFixed(2)
|
pi_cpu.innerText = (data.cpu.load).toFixed(2)
|
||||||
pi_mem.innerText = data.memory.available.toFixed(2)
|
pi_mem.innerText = data.memory.available.toFixed(2)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user