Fix: openwrt widget handle null id in json rpc responses and cpu load representation (#3576)

This commit is contained in:
Liran Vaknin 2024-06-04 10:11:11 +03:00 committed by GitHub
parent ccc27142ef
commit 9803ef70c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -77,7 +77,7 @@ async function fetchSystem(url) {
const systemResponse = JSON.parse(data.toString())[1];
const response = {
uptime: systemResponse.uptime,
cpuLoad: systemResponse.load[1],
cpuLoad: (systemResponse.load[1] / 65536.0).toFixed(2),
};
return [200, contentType, response];
}