fix: round cpu usage in chart (#4182)

fixes #4168
This commit is contained in:
Boy132 2022-06-28 00:30:00 +02:00 committed by GitHub
parent 16725e656b
commit 63cf6ee96e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ export default () => {
return; return;
} }
cpu.push(values.cpu_absolute); cpu.push(values.cpu_absolute.toFixed(2));
memory.push(Math.floor(values.memory_bytes / 1024 / 1024)); memory.push(Math.floor(values.memory_bytes / 1024 / 1024));
network.push([ network.push([
previous.current.tx < 0 ? 0 : Math.max(0, values.network.tx_bytes - previous.current.tx), previous.current.tx < 0 ? 0 : Math.max(0, values.network.tx_bytes - previous.current.tx),