Fix turning stats to zero by casting them to int before multiplying.

This commit is contained in:
matlorr
2024-12-28 11:13:11 +01:00
parent 5f30572741
commit 52898d93e7
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -134,8 +134,8 @@ function LandingPage() {
}
if (line2) {
let values = line2.split(',')
setUsageCPU(100 * parseInt(values[0]));
setUsageMem(100 * parseInt(values[1]));
setUsageCPU(100 * parseFloat(values[0]));
setUsageMem(100 * parseFloat(values[1]));
}
}).catch(err => {
console.info('server stats unavailable')