Merge pull request #610 from benphelps/fix-604

Fix: Hide docker memory stats when unsupported
pull/626/head
shamoon 2 years ago committed by GitHub
commit d3c6d1fe85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) })} />
<Block label="docker.mem" value={t("common.bytes", { value: statsData.stats.memory_stats.usage })} />
{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