mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 06:00:06 +02:00
feat(cp-frontend): only show GraphsContainer when metrics existent
This commit is contained in:
parent
8695a134d2
commit
9c4d69d586
@ -179,7 +179,7 @@ const ServiceListItem = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const metrics = !children.length
|
const graphs = !children.length && Object.keys(service.metrics).length
|
||||||
? Object.keys(service.metrics).map(key => (
|
? Object.keys(service.metrics).map(key => (
|
||||||
<GraphContainer xs={4}>
|
<GraphContainer xs={4}>
|
||||||
<GraphLeftShaddow />
|
<GraphLeftShaddow />
|
||||||
@ -193,6 +193,10 @@ const ServiceListItem = ({
|
|||||||
))
|
))
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
const metrics = graphs ? (
|
||||||
|
<GraphsContainer>{graphs}</GraphsContainer>
|
||||||
|
) : null;
|
||||||
|
|
||||||
const view = children.length ? (
|
const view = children.length ? (
|
||||||
<CardGroupView>{childrenItems}</CardGroupView>
|
<CardGroupView>{childrenItems}</CardGroupView>
|
||||||
) : (
|
) : (
|
||||||
@ -202,7 +206,7 @@ const ServiceListItem = ({
|
|||||||
<Status service={service} />
|
<Status service={service} />
|
||||||
<HealthInfoContainer>{healthyInfo}</HealthInfoContainer>
|
<HealthInfoContainer>{healthyInfo}</HealthInfoContainer>
|
||||||
</StatusContainer>
|
</StatusContainer>
|
||||||
<GraphsContainer>{metrics}</GraphsContainer>
|
{metrics}
|
||||||
</ServiceView>
|
</ServiceView>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user