This commit is contained in:
赵鑫 2022-09-04 15:05:46 +08:00
parent 8bab30364b
commit 77091ca36a

View File

@ -51,18 +51,16 @@
</div>
<script>
function getinfo(url) {
fetch(new Request('http://zhao:4000'))
fetch(new Request('http://zhao/status'))
.then(res => res.json())
.then(data => {
// console.table(data)
zhao_temp.innerText = data.cpu.temperature.toFixed(2)
zhao_cpu.innerText = (data.cpu.load * 100).toFixed(2)
zhao_mem.innerText = data.memory.available.toFixed(2)
})
fetch(new Request('http://pi:4000'))
fetch(new Request('http://pi/status'))
.then(res => res.json())
.then(data => {
// console.table(data)
pi_temp.innerText = data.cpu.temperature.toFixed(2)
pi_cpu.innerText = (data.cpu.load * 100).toFixed(2)
pi_mem.innerText = data.memory.available.toFixed(2)