Skip to content

Commit d9128c5

Browse files
committed
console: ingest node - review update
1 parent e0f1acb commit d9128c5

File tree

1 file changed

+29
-50
lines changed
  • src/core_plugins/console/api_server/es_6_0

1 file changed

+29
-50
lines changed

src/core_plugins/console/api_server/es_6_0/ingest.js

Lines changed: 29 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ const appendProcessorDefinition = {
2626
},
2727
field: '',
2828
value: [],
29-
on_failure: [],
30-
if: ''
29+
...commonPipelineParams
3130
}
3231
};
3332

@@ -42,8 +41,7 @@ const bytesProcessorDefinition = {
4241
ignore_missing: {
4342
__one_of: [ false, true ]
4443
},
45-
on_failure: [],
46-
if: ''
44+
...commonPipelineParams
4745
}
4846
};
4947

@@ -62,8 +60,7 @@ const convertProcessorDefinition = {
6260
ignore_missing: {
6361
__one_of: [ false, true ]
6462
},
65-
on_failure: [],
66-
if: ''
63+
...commonPipelineParams
6764
}
6865
};
6966

@@ -79,8 +76,7 @@ const dateProcessorDefinition = {
7976
formats: [],
8077
timezone: 'UTC',
8178
locale: 'ENGLISH',
82-
on_failure: [],
83-
if: ''
79+
...commonPipelineParams
8480
}
8581
};
8682

@@ -99,8 +95,7 @@ const dateIndexNameProcessorDefinition = {
9995
timezone: 'UTC',
10096
locale: 'ENGLISH',
10197
index_name_format: 'yyyy-MM-dd',
102-
on_failure: [],
103-
if: ''
98+
...commonPipelineParams
10499
}
105100
};
106101

@@ -117,8 +112,7 @@ const dissectProcessorDefinition = {
117112
ignore_missing: {
118113
__one_of: [ false, true ]
119114
},
120-
on_failure: [],
121-
if: ''
115+
...commonPipelineParams
122116
}
123117
};
124118

@@ -130,17 +124,15 @@ const dotExpanderProcessorDefinition = {
130124
},
131125
field: '',
132126
path: '',
133-
on_failure: [],
134-
if: ''
127+
...commonPipelineParams
135128
}
136129
};
137130

138131
// Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/drop-processor.html
139132
const dropProcessorDefinition = {
140133
drop: {
141134
__template: {},
142-
on_failure: [],
143-
if: ''
135+
...commonPipelineParams
144136
}
145137
};
146138

@@ -151,8 +143,7 @@ const failProcessorDefinition = {
151143
message: ''
152144
},
153145
message: '',
154-
on_failure: [],
155-
if: ''
146+
...commonPipelineParams
156147
}
157148
};
158149

@@ -167,8 +158,7 @@ const foreachProcessorDefinition = {
167158
processor: {
168159
__scope_link: '_processor'
169160
},
170-
on_failure: [],
171-
if: ''
161+
...commonPipelineParams
172162
}
173163
};
174164

@@ -188,8 +178,7 @@ const grokProcessorDefinition = {
188178
ignore_missing: {
189179
__one_of: [ false, true ]
190180
},
191-
on_failure: [],
192-
if: ''
181+
...commonPipelineParams
193182
}
194183
};
195184

@@ -204,8 +193,7 @@ const gsubProcessorDefinition = {
204193
field: '',
205194
pattern: '',
206195
replacement: '',
207-
on_failure: [],
208-
if: ''
196+
...commonPipelineParams
209197
}
210198
};
211199

@@ -218,8 +206,7 @@ const joinProcessorDefinition = {
218206
},
219207
field: '',
220208
separator: '',
221-
on_failure: [],
222-
if: ''
209+
...commonPipelineParams
223210
}
224211
};
225212

@@ -234,8 +221,7 @@ const jsonProcessorDefinition = {
234221
add_to_root: {
235222
__one_of: [ false, true ]
236223
},
237-
on_failure: [],
238-
if: ''
224+
...commonPipelineParams
239225
}
240226
};
241227

@@ -255,8 +241,7 @@ const kvProcessorDefinition = {
255241
ignore_missing: {
256242
__one_of: [ false, true ]
257243
},
258-
on_failure: [],
259-
if: ''
244+
...commonPipelineParams
260245
}
261246
};
262247

@@ -270,8 +255,7 @@ const lowercaseProcessorDefinition = {
270255
ignore_missing: {
271256
__one_of: [ false, true ]
272257
},
273-
on_failure: [],
274-
if: ''
258+
...commonPipelineParams
275259
}
276260
};
277261

@@ -282,8 +266,7 @@ const pipelineProcessorDefinition = {
282266
pipeline: ''
283267
},
284268
pipeline: '',
285-
on_failure: [],
286-
if: ''
269+
...commonPipelineParams
287270
}
288271
};
289272

@@ -294,8 +277,7 @@ const removeProcessorDefinition = {
294277
field: ''
295278
},
296279
field: '',
297-
on_failure: [],
298-
if: ''
280+
...commonPipelineParams
299281
}
300282
};
301283

@@ -311,8 +293,7 @@ const renameProcessorDefinition = {
311293
ignore_missing: {
312294
__one_of: [ false, true ]
313295
},
314-
on_failure: [],
315-
if: ''
296+
...commonPipelineParams
316297
}
317298
};
318299

@@ -325,8 +306,7 @@ const scriptProcessorDefinition = {
325306
id: '',
326307
inline: '',
327308
params: {},
328-
on_failure: [],
329-
if: ''
309+
...commonPipelineParams
330310
}
331311
};
332312

@@ -342,8 +322,7 @@ const setProcessorDefinition = {
342322
override: {
343323
__one_of: [ true, false ]
344324
},
345-
on_failure: [],
346-
if: ''
325+
...commonPipelineParams
347326
}
348327
};
349328

@@ -359,8 +338,7 @@ const splitProcessorDefinition = {
359338
ignore_missing: {
360339
__one_of: [ false, true ]
361340
},
362-
on_failure: [],
363-
if: ''
341+
...commonPipelineParams
364342
}
365343
};
366344

@@ -372,8 +350,7 @@ const sortProcessorDefinition = {
372350
},
373351
field: '',
374352
order: 'asc',
375-
on_failure: [],
376-
if: ''
353+
...commonPipelineParams
377354
}
378355
};
379356

@@ -387,8 +364,7 @@ const trimProcessorDefinition = {
387364
ignore_missing: {
388365
__one_of: [ false, true ]
389366
},
390-
on_failure: [],
391-
if: ''
367+
...commonPipelineParams
392368
}
393369
};
394370

@@ -402,8 +378,7 @@ const uppercaseProcessorDefinition = {
402378
ignore_missing: {
403379
__one_of: [ false, true ]
404380
},
405-
on_failure: [],
406-
if: ''
381+
...commonPipelineParams
407382
}
408383
};
409384

@@ -445,6 +420,10 @@ const pipelineDefinition = {
445420
version: 123,
446421
};
447422

423+
const commonPipelineParams = {
424+
on_failure: [],
425+
if: ''
426+
}
448427

449428
export default function (api) {
450429

0 commit comments

Comments
 (0)