diff --git a/frontend/src/components/QuickStats.tsx b/frontend/src/components/QuickStats.tsx index af23c56..66c9586 100644 --- a/frontend/src/components/QuickStats.tsx +++ b/frontend/src/components/QuickStats.tsx @@ -32,14 +32,14 @@ export function QuickStats(props: Props) {
{bytesToReadable(memoryUse)} { - (memoryUse / props.sysinfo.mem_size * 100).toFixed(2) + ((memoryUse / props.sysinfo.mem_size * 100) || 0).toFixed(2) }% of total memory ({bytesToReadable(props.sysinfo.mem_size)})
{bytesToReadable(swapUse)} { - (swapUse / props.sysinfo.swap_size * 100).toFixed(2) + ((swapUse / props.sysinfo.swap_size * 100) || 0).toFixed(2) }% of total swap ({bytesToReadable(props.sysinfo.swap_size)})
diff --git a/frontend/src/pages/Home/data.tsx b/frontend/src/pages/Home/data.tsx index 78fe207..7e48fa6 100644 --- a/frontend/src/pages/Home/data.tsx +++ b/frontend/src/pages/Home/data.tsx @@ -51,6 +51,8 @@ export function DataHome(props: Props) { )} xLabel="Time" yLabel="Memory Usage (MB)" + max={sysinfo.mem_size / 1024 / 1024} + min={0} datasets={[ { data: memoryData.map((v) => { @@ -126,6 +128,7 @@ export function DataHome(props: Props) { )} xLabel="Time" yLabel="Network Usage (MB)" + min={0} datasets={Object.keys(networkData).map((network, i) => { return { data: networkData[network].map((v) => {