mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-11 23:58:46 +00:00
Hide docker memory stats when unsupported
This commit is contained in:
parent
f09268230e
commit
57d12c32fc
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ export default function Component({ service }) {
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block label="docker.cpu" value={t("common.percent", { value: calculateCPUPercent(statsData.stats) })} />
|
<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 })} />
|
<Block label="docker.mem" value={t("common.bytes", { value: statsData.stats.memory_stats.usage })} />
|
||||||
|
}
|
||||||
{network && (
|
{network && (
|
||||||
<>
|
<>
|
||||||
<Block label="docker.rx" value={t("common.bytes", { value: network.rx_bytes })} />
|
<Block label="docker.rx" value={t("common.bytes", { value: network.rx_bytes })} />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue