Skip to content

Commit

Permalink
Refine naming.
Browse files Browse the repository at this point in the history
  • Loading branch information
skh committed Apr 18, 2019
1 parent 78b03a2 commit 0bc4adc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x-pack/plugins/infra/server/lib/snapshot/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class InfraSnapshot {
const groupedNodeBuckets = await groupedNodesPromise;
const nodeMetricBuckets = await nodeMetricsPromise;

return mergeNodeMetrics(groupedNodeBuckets, nodeMetricBuckets, options);
return mergeNodeBuckets(groupedNodeBuckets, nodeMetricBuckets, options);
}
}

Expand Down Expand Up @@ -198,15 +198,15 @@ const getAllCompositeAggregationData = async <BucketType>(
);
};

const mergeNodeMetrics = (
nodes: InfraSnapshotNodeGroupByBucket[],
metrics: InfraSnapshotNodeMetricsBucket[],
const mergeNodeBuckets = (
nodeGroupByBuckets: InfraSnapshotNodeGroupByBucket[],
nodeMetricsBuckets: InfraSnapshotNodeMetricsBucket[],
options: InfraSnapshotRequestOptions
): InfraSnapshotNode[] => {
const result: any[] = [];
const nodeMetricsForLookup = getNodeMetricsForLookup(metrics);
const nodeMetricsForLookup = getNodeMetricsForLookup(nodeMetricsBuckets);

nodes.forEach(node => {
nodeGroupByBuckets.forEach(node => {
const returnNode = {
path: getNodePath(node, options),
metric: getNodeMetrics(nodeMetricsForLookup[node.key.node], options),
Expand Down

0 comments on commit 0bc4adc

Please sign in to comment.