1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-28 06:00:06 +02:00

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 => (
<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>

View File

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

View File

@ -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) {