diff --git a/packages/cp-frontend/src/components/services/list-item.js b/packages/cp-frontend/src/components/services/list-item.js
index 6fccbbbc..1ceefc52 100644
--- a/packages/cp-frontend/src/components/services/list-item.js
+++ b/packages/cp-frontend/src/components/services/list-item.js
@@ -179,23 +179,22 @@ const ServiceListItem = ({
);
}
- const graphs = !children.length && Object.keys(service.metrics).length
- ? Object.keys(service.metrics).map(key => (
-
-
- {key}
-
-
- ))
- : null;
+ const graphs =
+ !children.length && Object.keys(service.metrics).length
+ ? Object.keys(service.metrics).map(key => (
+
+
+ {key}
+
+
+ ))
+ : null;
- const metrics = graphs ? (
- {graphs}
- ) : null;
+ const metrics = graphs ? {graphs} : null;
const view = children.length ? (
{childrenItems}
diff --git a/packages/cp-frontend/src/containers/metrics/metrics-data-hoc.js b/packages/cp-frontend/src/containers/metrics/metrics-data-hoc.js
index 6324b2a5..b1eaac42 100644
--- a/packages/cp-frontend/src/containers/metrics/metrics-data-hoc.js
+++ b/packages/cp-frontend/src/containers/metrics/metrics-data-hoc.js
@@ -61,10 +61,7 @@ export const withServiceMetricsGql = ({
return [];
}
- const service = find(services, [
- 'id',
- serviceId
- ]);
+ const service = find(services, ['id', serviceId]);
if (!service) {
return [];
diff --git a/packages/portal-api/lib/data/index.js b/packages/portal-api/lib/data/index.js
index 949aba51..01213813 100644
--- a/packages/portal-api/lib/data/index.js
+++ b/packages/portal-api/lib/data/index.js
@@ -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) => {