Skip to content

Commit

Permalink
[ip location processor] Add mmdb suffix to db file names (elastic#196788
Browse files Browse the repository at this point in the history
)

## Summary

Simply adds the mmdb suffix to the db names.

Closes elastic#196745

(cherry picked from commit f789ba6)
  • Loading branch information
mattkime committed Oct 18, 2024
1 parent e0d0ff9 commit e2fa598
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ import { PropertiesField } from './common_fields/properties_field';
import type { GeoipDatabase } from '../../../../../../../common/types';
import { getTypeLabel } from '../../../../../sections/manage_processors/constants';

const extension = '.mmdb';

const fieldsConfig: FieldsConfig = {
/* Optional field config */
database_file: {
type: FIELD_TYPES.COMBO_BOX,
deserializer: to.arrayOfStrings,
serializer: (v: string[]) => (v.length ? v[0] : undefined),
deserializer: (v: unknown) => to.arrayOfStrings(v).map((str) => str?.split(extension)[0]),
serializer: (v: string[]) => (v.length ? `${v[0]}${extension}` : undefined),
label: i18n.translate('xpack.ingestPipelines.pipelineEditor.ipLocationForm.databaseFileLabel', {
defaultMessage: 'Database file (optional)',
}),
Expand Down

0 comments on commit e2fa598

Please sign in to comment.