File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
src/components/QueryEditor/MetricAggregationsEditor Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,9 @@ import { segmentStyles } from '../styles';
1515import { SettingsEditor } from './SettingsEditor' ;
1616import {
1717 isMetricAggregationWithField ,
18- isMetricAggregationWithInlineScript ,
1918 isMetricAggregationWithSettings ,
2019 isPipelineAggregation ,
21- isPipelineAggregationWithMultipleBucketPaths ,
20+ isPipelineAggregationWithMultipleBucketPaths
2221} from './aggregations' ;
2322import { changeMetricField , changeMetricType } from './state/actions' ;
2423import { getStyles } from './styles' ;
@@ -64,13 +63,8 @@ export const MetricEditor = ({ value }: Props) => {
6463 const loadOptions = useCallback ( async ( ) => {
6564 const remoteFields = await getFields ( ) ;
6665
67- // Metric aggregations that have inline script support don't require a field to be set.
68- if ( isMetricAggregationWithInlineScript ( value ) ) {
69- return [ { label : 'None' } , ...remoteFields ] ;
70- }
71-
7266 return remoteFields ;
73- } , [ getFields , value ] ) ;
67+ } , [ getFields ] ) ;
7468
7569 const previousMetrics = query . metrics ! . slice (
7670 0 ,
Original file line number Diff line number Diff line change 66 BaseMetricAggregation ,
77 MetricAggregationWithField ,
88 MetricAggregationWithMissingSupport ,
9- MetricAggregationWithInlineScript ,
109 PipelineMetricAggregation ,
1110 MetricAggregationWithSettings ,
1211} from '../../../types' ;
@@ -62,10 +61,6 @@ export const isMetricAggregationWithMeta = (
6261 metric : BaseMetricAggregation | MetricAggregationWithMeta
6362) : metric is MetricAggregationWithMeta => metricAggregationConfig [ metric . type ] . hasMeta ;
6463
65- export const isMetricAggregationWithInlineScript = (
66- metric : BaseMetricAggregation | MetricAggregationWithInlineScript
67- ) : metric is MetricAggregationWithInlineScript => metricAggregationConfig [ metric . type ] . supportsInlineScript ;
68-
6964export const METRIC_AGGREGATION_TYPES : MetricAggregationType [ ] = [
7065 'count' ,
7166 'avg' ,
You can’t perform that action at this time.
0 commit comments