From 4b16fcd6fb6eed34a0ef4bee70614101b075710c Mon Sep 17 00:00:00 2001 From: Zhao Xin <7176466@qq.com> Date: Thu, 8 Sep 2022 10:16:28 +0800 Subject: [PATCH] update --- views/home.pug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/home.pug b/views/home.pug index 11b88c5..1e4d07a 100644 --- a/views/home.pug +++ b/views/home.pug @@ -158,7 +158,7 @@ block main p.card-text | 内存剩余: code#zhao_mem - | MB + | 字节 .col(style="min-width:15rem;") .card.border-danger .card-header @@ -179,21 +179,21 @@ block main p.card-text | 内存剩余: code#pi_mem - | MB + | 字节 script. function get_rpis_status() { fetch(new Request('http://zhao/status')) .then(resp => resp.json()) .then(data => { 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) }) fetch(new Request('http://pi/status')) .then(resp => resp.json()) .then(data => { 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) }) }