Skip to content

Commit

Permalink
[Timelion] resolve duplicate imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaanj committed Apr 19, 2021
1 parent 78b5eea commit 53bdf8d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 53bdf8d

Please sign in to comment.