From 53bdf8d66b779ec0031d432e5cc17a18edfc03c2 Mon Sep 17 00:00:00 2001 From: Dzmitry Tamashevich Date: Mon, 19 Apr 2021 15:54:56 +0300 Subject: [PATCH] [Timelion] resolve duplicate imports --- .../server/series_functions/es/lib/create_date_agg.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js b/src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js index 129fdf7071d3e..eabceee995676 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js +++ b/src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js @@ -7,8 +7,8 @@ */ import { buildAggBody } from './agg_body'; -import { search } from '../../../../../../plugins/data/server'; -import { METRIC_TYPES } from '../../../../../data/common/search/aggs/metrics/index'; +import { search, METRIC_TYPES } from '../../../../../data/server'; + const { dateHistogramInterval } = search.aggs; export default function createDateAgg(config, tlConfig, scriptedFields) { @@ -32,6 +32,8 @@ export default function createDateAgg(config, tlConfig, scriptedFields) { (config.metric || []).forEach((metric) => { const metricBody = {}; const [metricName, metricArgs] = metric.split(/:(.+)/); + console.log('METRIC_TYPES.COUNT', METRIC_TYPES.COUNT); + console.log('METRIC_TYPES.PERCENTILES', METRIC_TYPES.PERCENTILES); if (metricName === METRIC_TYPES.COUNT) { // This is pretty lame, but its how the "doc_count" metric has to be implemented at the moment // It simplifies the aggregation tree walking code considerably