File tree 2 files changed +2
-13
lines changed
src/components/QueryEditor/MetricAggregationsEditor
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';
15
15
import { SettingsEditor } from './SettingsEditor' ;
16
16
import {
17
17
isMetricAggregationWithField ,
18
- isMetricAggregationWithInlineScript ,
19
18
isMetricAggregationWithSettings ,
20
19
isPipelineAggregation ,
21
- isPipelineAggregationWithMultipleBucketPaths ,
20
+ isPipelineAggregationWithMultipleBucketPaths
22
21
} from './aggregations' ;
23
22
import { changeMetricField , changeMetricType } from './state/actions' ;
24
23
import { getStyles } from './styles' ;
@@ -64,13 +63,8 @@ export const MetricEditor = ({ value }: Props) => {
64
63
const loadOptions = useCallback ( async ( ) => {
65
64
const remoteFields = await getFields ( ) ;
66
65
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
-
72
66
return remoteFields ;
73
- } , [ getFields , value ] ) ;
67
+ } , [ getFields ] ) ;
74
68
75
69
const previousMetrics = query . metrics ! . slice (
76
70
0 ,
Original file line number Diff line number Diff line change 6
6
BaseMetricAggregation ,
7
7
MetricAggregationWithField ,
8
8
MetricAggregationWithMissingSupport ,
9
- MetricAggregationWithInlineScript ,
10
9
PipelineMetricAggregation ,
11
10
MetricAggregationWithSettings ,
12
11
} from '../../../types' ;
@@ -62,10 +61,6 @@ export const isMetricAggregationWithMeta = (
62
61
metric : BaseMetricAggregation | MetricAggregationWithMeta
63
62
) : metric is MetricAggregationWithMeta => metricAggregationConfig [ metric . type ] . hasMeta ;
64
63
65
- export const isMetricAggregationWithInlineScript = (
66
- metric : BaseMetricAggregation | MetricAggregationWithInlineScript
67
- ) : metric is MetricAggregationWithInlineScript => metricAggregationConfig [ metric . type ] . supportsInlineScript ;
68
-
69
64
export const METRIC_AGGREGATION_TYPES : MetricAggregationType [ ] = [
70
65
'count' ,
71
66
'avg' ,
You can’t perform that action at this time.
0 commit comments