mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 06:00:06 +02:00
style: format
This commit is contained in:
parent
9c4d69d586
commit
2b46af7e2f
@ -179,7 +179,8 @@ const ServiceListItem = ({
|
||||
);
|
||||
}
|
||||
|
||||
const graphs = !children.length && Object.keys(service.metrics).length
|
||||
const graphs =
|
||||
!children.length && Object.keys(service.metrics).length
|
||||
? Object.keys(service.metrics).map(key => (
|
||||
<GraphContainer xs={4}>
|
||||
<GraphLeftShaddow />
|
||||
@ -193,9 +194,7 @@ const ServiceListItem = ({
|
||||
))
|
||||
: null;
|
||||
|
||||
const metrics = graphs ? (
|
||||
<GraphsContainer>{graphs}</GraphsContainer>
|
||||
) : null;
|
||||
const metrics = graphs ? <GraphsContainer>{graphs}</GraphsContainer> : null;
|
||||
|
||||
const view = children.length ? (
|
||||
<CardGroupView>{childrenItems}</CardGroupView>
|
||||
|
@ -61,10 +61,7 @@ export const withServiceMetricsGql = ({
|
||||
return [];
|
||||
}
|
||||
|
||||
const service = find(services, [
|
||||
'id',
|
||||
serviceId
|
||||
]);
|
||||
const service = find(services, ['id', serviceId]);
|
||||
|
||||
if (!service) {
|
||||
return [];
|
||||
|
@ -696,14 +696,17 @@ class Data extends EventEmitter {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
cb(err, ForceArray(result.successes).map(({ name, instances }) => ({
|
||||
cb(err, ForceArray(result.successes).map(({ name, instances }) => {
|
||||
return {
|
||||
id: Uuid(),
|
||||
serviceName: name,
|
||||
replicas: ForceArray(instances).length
|
||||
})));
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
const handleServices = ({ dg }) => (err, services) => {
|
||||
const handleServices = ({ dg }) => {
|
||||
return (err, services) => {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
@ -723,6 +726,7 @@ class Data extends EventEmitter {
|
||||
}
|
||||
}, handleServiceInstanceMap);
|
||||
};
|
||||
};
|
||||
|
||||
const handleDeploymentGroup = (err, dg) => {
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user