Skip to content

Commit

Permalink
update default description of foreach to always display
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Apr 8, 2021
1 parent bb79b28 commit c0caafb
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,13 @@ export const mapProcessorTypeToDescriptor: MapProcessorTypeToDescriptor = {
typeDescription: i18n.translate('xpack.ingestPipelines.processors.description.foreach', {
defaultMessage: 'Applies an ingest processor to each value in an array.',
}),
getDefaultDescription: ({ field, processor }) => {
const processorName = Object.keys(processor ?? {})[0];
return processorName
? i18n.translate('xpack.ingestPipelines.processors.defaultDescription.foreach', {
defaultMessage: 'Runs the "{processorName}" processor for each object in "{field}"',
values: {
field,
processorName,
},
})
: undefined;
},
getDefaultDescription: ({ field }) =>
i18n.translate('xpack.ingestPipelines.processors.defaultDescription.foreach', {
defaultMessage: 'Runs a processor for each object in "{field}"',
values: {
field,
},
}),
},
geoip: {
FieldsComponent: GeoIP,
Expand Down

0 comments on commit c0caafb

Please sign in to comment.