dev #1

Merged
sky merged 16 commits from dev into beta 2024-12-12 18:27:29 +08:00
Showing only changes of commit d3abaf7810 - Show all commits

View File

@ -2031,7 +2031,7 @@
.then(response => response.text()) .then(response => response.text())
.then(data => { .then(data => {
const lines = data.split("\n"); 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()); const validLines = lines.filter(line => line.trim() !== '' && line.includes(": ")).map(line => line.trim());
this.cpuUsage = parseFloat(validLines[0].split(": ")[1]).toFixed(1); this.cpuUsage = parseFloat(validLines[0].split(": ")[1]).toFixed(1);