Added parseFloat to ramPercent.

node-20
ben 2023-09-10 16:00:13 +08:00
parent 411b88aa54
commit 8b7f11c434
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ onWebSocketEvent(function (d){
cpuIndicatorBar.css('width',cpuPercent)
cpuIndicatorPercentText.html(cpuPercent)
//ram
var ramPercent = d.ram.percent.toFixed(1) + '%'
var ramPercent = parseFloat(d.ram.percent).toFixed(1) + '%'
ramIndicatorBar.css('width',ramPercent)
ramIndicatorPercentText.html(ramPercent)
ramIndicatorUsed.html(d.ram.used.toFixed(2))