OPNsense widget : code cleanup
This commit is contained in:
parent
86f21afe1e
commit
f1d00a29d3
@ -69,11 +69,12 @@ export default function Component({ service }) {
|
|||||||
<Block label="opnsense.memory" />
|
<Block label="opnsense.memory" />
|
||||||
<Block label="opnsense.wanUpload" />
|
<Block label="opnsense.wanUpload" />
|
||||||
<Block label="opnsense.wanDownload" />
|
<Block label="opnsense.wanDownload" />
|
||||||
|
<Block label="opnsense.wanUploadRate" />
|
||||||
|
<Block label="opnsense.wanDownloadRate" />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const cpuIdle = activityData.headers[2].match(/ ([0-9.]+)% idle/)[1];
|
const cpuIdle = activityData.headers[2].match(/ ([0-9.]+)% idle/)[1];
|
||||||
const cpu = 100 - parseFloat(cpuIdle);
|
const cpu = 100 - parseFloat(cpuIdle);
|
||||||
const memory = sumMemory(activityData.headers[3]);
|
const memory = sumMemory(activityData.headers[3]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user