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

style(cp-frontend): format

This commit is contained in:
Sérgio Ramos 2017-08-30 14:09:34 +01:00
parent d08a8b00a9
commit 0d659c94e8

View File

@ -12,7 +12,7 @@ export const MetricNames = [
];
export const withServiceMetricsPolling = ({
pollingInterval = 1000, // in milliseconds
pollingInterval = 1000, // In milliseconds
getPreviousEnd = () =>
moment()
.utc()
@ -55,14 +55,17 @@ export const withServiceMetricsGql = ({
instanceId,
metricName
) => {
const service = find(get(previousResult, 'deploymentGroup.services', []), ['id', serviceId]);
const service = find(get(previousResult, 'deploymentGroup.services', []), [
'id',
serviceId
]);
if (!service) {
return [];
}
return service
.instances.find(i => i.id === instanceId)
return service.instances
.find(i => i.id === instanceId)
.metrics.find(m => m.name === metricName).metrics;
};
@ -99,7 +102,7 @@ export const withServiceMetricsGql = ({
const params = props.match.params;
const deploymentGroupSlug = params.deploymentGroup;
// this is potentially prone to overfetching if we already have data within timeframe and we leave the page then come back to it
// This is potentially prone to overfetching if we already have data within timeframe and we leave the page then come back to it
const end = moment();
const start = moment(end).subtract(
graphDurationSeconds + updateIntervalSeconds,