File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/ui/public/agg_types/param_types Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ import editorHtml from 'ui/agg_types/controls/field.html';
4
4
import AggTypesParamTypesBaseProvider from 'ui/agg_types/param_types/base' ;
5
5
import 'ui/filters/field_type' ;
6
6
import IndexedArray from 'ui/indexed_array' ;
7
+ import Notifier from 'ui/notify/notifier' ;
7
8
8
9
export default function FieldAggParamFactory ( Private , $filter ) {
9
10
let BaseAggParam = Private ( AggTypesParamTypesBaseProvider ) ;
11
+ const notifier = new Notifier ( ) ;
10
12
11
13
_ . class ( FieldAggParam ) . inherits ( BaseAggParam ) ;
12
14
function FieldAggParam ( config ) {
@@ -67,7 +69,12 @@ export default function FieldAggParamFactory(Private, $filter) {
67
69
throw new SavedObjectNotFound ( 'index-pattern-field' , fieldName ) ;
68
70
}
69
71
70
- return field ;
72
+ const validField = this . getFieldOptions ( aggConfig ) . byName [ fieldName ] ;
73
+ if ( ! validField ) {
74
+ notifier . error ( `"field" is invalid` ) ;
75
+ }
76
+
77
+ return validField ;
71
78
} ;
72
79
73
80
/**
You can’t perform that action at this time.
0 commit comments