Hide docker memory stats when unsupported

pull/610/head
Michael Shamoon 2 years ago
parent f09268230e
commit 57d12c32fc

@ -46,7 +46,9 @@ export default function Component({ service }) {
return (
<Container service={service}>
<Block label="docker.cpu" value={t("common.percent", { value: calculateCPUPercent(statsData.stats) })} />
{statsData.stats.memory_stats.usage &&
<Block label="docker.mem" value={t("common.bytes", { value: statsData.stats.memory_stats.usage })} />
}
{network && (
<>
<Block label="docker.rx" value={t("common.bytes", { value: network.rx_bytes })} />

Loading…
Cancel
Save