dev #1
@ -2031,7 +2031,7 @@
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
const lines = data.split("\n");
|
||||
// 跳过空行和Content-Type行
|
||||
// Skip blank lines and Content-Type lines.
|
||||
const validLines = lines.filter(line => line.trim() !== '' && line.includes(": ")).map(line => line.trim());
|
||||
|
||||
this.cpuUsage = parseFloat(validLines[0].split(": ")[1]).toFixed(1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user