style: format
This commit is contained in:
parent
9c4d69d586
commit
2b46af7e2f
@ -179,23 +179,22 @@ const ServiceListItem = ({
|
||||
);
|
||||
}
|
||||
|
||||
const graphs = !children.length && Object.keys(service.metrics).length
|
||||
? Object.keys(service.metrics).map(key => (
|
||||
<GraphContainer xs={4}>
|
||||
<GraphLeftShaddow />
|
||||
<GraphTitle>{key}</GraphTitle>
|
||||
<MetricGraph
|
||||
key={key}
|
||||
metricsData={service.metrics[key]}
|
||||
graphDurationSeconds={90}
|
||||
/>
|
||||
</GraphContainer>
|
||||
))
|
||||
: null;
|
||||
const graphs =
|
||||
!children.length && Object.keys(service.metrics).length
|
||||
? Object.keys(service.metrics).map(key => (
|
||||
<GraphContainer xs={4}>
|
||||
<GraphLeftShaddow />
|
||||
<GraphTitle>{key}</GraphTitle>
|
||||
<MetricGraph
|
||||
key={key}
|
||||
metricsData={service.metrics[key]}
|
||||
graphDurationSeconds={90}
|
||||
/>
|
||||
</GraphContainer>
|
||||
))
|
||||
: 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,32 +696,36 @@ class Data extends EventEmitter {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
cb(err, ForceArray(result.successes).map(({ name, instances }) => ({
|
||||
id: Uuid(),
|
||||
serviceName: name,
|
||||
replicas: ForceArray(instances).length
|
||||
})));
|
||||
cb(err, ForceArray(result.successes).map(({ name, instances }) => {
|
||||
return {
|
||||
id: Uuid(),
|
||||
serviceName: name,
|
||||
replicas: ForceArray(instances).length
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
const handleServices = ({ dg }) => (err, services) => {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
VAsync.forEachParallel({
|
||||
inputs: services,
|
||||
func: (service, next) => {
|
||||
service.instances({}, (err, instances) => {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
next(err, Object.assign({}, service, {
|
||||
instances
|
||||
}));
|
||||
});
|
||||
const handleServices = ({ dg }) => {
|
||||
return (err, services) => {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
}, handleServiceInstanceMap);
|
||||
|
||||
VAsync.forEachParallel({
|
||||
inputs: services,
|
||||
func: (service, next) => {
|
||||
service.instances({}, (err, instances) => {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
next(err, Object.assign({}, service, {
|
||||
instances
|
||||
}));
|
||||
});
|
||||
}
|
||||
}, handleServiceInstanceMap);
|
||||
};
|
||||
};
|
||||
|
||||
const handleDeploymentGroup = (err, dg) => {
|
||||
|
Loading…
Reference in New Issue
Block a user