Merge branch 'opnsense-widget'

This commit is contained in:
Benoit 2023-01-20 09:26:57 +01:00
commit 19560e9007

View File

@ -24,11 +24,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 = activityData.headers[3].match(/Mem: (.+) Active,/)[1]; const memory = activityData.headers[3].match(/Mem: (.+) Active,/)[1];