style: format

This commit is contained in:
Sérgio Ramos 2017-08-30 17:00:42 +01:00
parent 9c4d69d586
commit 2b46af7e2f
3 changed files with 43 additions and 43 deletions

View File

@ -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 => ( ? Object.keys(service.metrics).map(key => (
<GraphContainer xs={4}> <GraphContainer xs={4}>
<GraphLeftShaddow /> <GraphLeftShaddow />
@ -193,9 +194,7 @@ const ServiceListItem = ({
)) ))
: null; : null;
const metrics = graphs ? ( const metrics = graphs ? <GraphsContainer>{graphs}</GraphsContainer> : null;
<GraphsContainer>{graphs}</GraphsContainer>
) : null;
const view = children.length ? ( const view = children.length ? (
<CardGroupView>{childrenItems}</CardGroupView> <CardGroupView>{childrenItems}</CardGroupView>

View File

@ -61,10 +61,7 @@ export const withServiceMetricsGql = ({
return []; return [];
} }
const service = find(services, [ const service = find(services, ['id', serviceId]);
'id',
serviceId
]);
if (!service) { if (!service) {
return []; return [];

View File

@ -696,14 +696,17 @@ class Data extends EventEmitter {
return cb(err); return cb(err);
} }
cb(err, ForceArray(result.successes).map(({ name, instances }) => ({ cb(err, ForceArray(result.successes).map(({ name, instances }) => {
return {
id: Uuid(), id: Uuid(),
serviceName: name, serviceName: name,
replicas: ForceArray(instances).length replicas: ForceArray(instances).length
}))); };
}));
}; };
const handleServices = ({ dg }) => (err, services) => { const handleServices = ({ dg }) => {
return (err, services) => {
if (err) { if (err) {
return cb(err); return cb(err);
} }
@ -723,6 +726,7 @@ class Data extends EventEmitter {
} }
}, handleServiceInstanceMap); }, handleServiceInstanceMap);
}; };
};
const handleDeploymentGroup = (err, dg) => { const handleDeploymentGroup = (err, dg) => {
if (err) { if (err) {