File tree 3 files changed +4
-15
lines changed
pages/workflow_detail/workflow_inputs
3 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import {
24
24
} from '@elastic/eui' ;
25
25
import { JsonLinesField } from '../input_fields' ;
26
26
import {
27
- customStringify ,
28
27
customStringifySingleLine ,
29
28
FETCH_ALL_QUERY_LARGE ,
30
29
IConfigField ,
Original file line number Diff line number Diff line change @@ -55,16 +55,6 @@ export function JsonLinesField(props: JsonLinesFieldProps) {
55
55
return (
56
56
< Field name = { props . fieldPath } >
57
57
{ ( { field, form } : FieldProps ) => {
58
- let errMsgToDisplay = undefined as string | undefined ;
59
- if ( validate ) {
60
- if ( customErrMsg ) {
61
- errMsgToDisplay = customErrMsg ;
62
- } else if ( getIn ( errors , field . name ) ) {
63
- errMsgToDisplay = getIn ( errors , field . name ) ;
64
- } else {
65
- errMsgToDisplay = undefined ;
66
- }
67
- }
68
58
return (
69
59
< EuiCompressedFormRow
70
60
fullWidth = { true }
@@ -80,7 +70,7 @@ export function JsonLinesField(props: JsonLinesFieldProps) {
80
70
) : undefined
81
71
}
82
72
helpText = { props . helpText || undefined }
83
- error = { errMsgToDisplay }
73
+ error = { validate ? customErrMsg : undefined }
84
74
isInvalid = {
85
75
validate
86
76
? getIn ( errors , field . name ) && getIn ( touched , field . name )
@@ -122,7 +112,9 @@ export function JsonLinesField(props: JsonLinesFieldProps) {
122
112
error ,
123
113
'message' ,
124
114
'Invalid JSON'
125
- ) . replace ( / ^ ( .* ?) \s + i n J S O N .* / , '$1' ) } `
115
+ )
116
+ . replace ( / ^ ( .* ?) \s + i n J S O N .* / , '$1' )
117
+ . replace ( / ^ ( .* ?) \s + a f t e r J S O N .* / , '$1' ) } `
126
118
) ;
127
119
}
128
120
} }
Original file line number Diff line number Diff line change @@ -185,8 +185,6 @@ export function prepareDocsForSimulate(
185
185
_source : doc ,
186
186
} ) ;
187
187
} ) ;
188
- console . log ( 'docobs: ' , docObjs ) ;
189
- console . log ( 'prepared docs: ' , preparedDocs ) ;
190
188
return preparedDocs ;
191
189
}
192
190
You can’t perform that action at this time.
0 commit comments