From e7174a211187f30b4eb363dd1f86310d2e116dfc Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 16 Sep 2022 12:13:34 +0800 Subject: [PATCH] Update index.js --- route/static/app/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/route/static/app/index.js b/route/static/app/index.js index 578b516e3..0abe8a0fa 100755 --- a/route/static/app/index.js +++ b/route/static/app/index.js @@ -85,6 +85,7 @@ function showCpuTips(rdata){ var cpuText = ''; if (rdata.cpu[2].length == 1){ + var cpuUse = parseFloat(rdata.cpu[2][0] == 0 ? 0 : rdata.cpu[2][0]).toFixed(1) cpuText += 'CPU-1:' + cpuUse + '%' } else{ for (var i = 1; i < rdata.cpu[2].length + 1; i++) {