[ip location processor] Add mmdb suffix to db file names (#196788)

## Summary

Simply adds the mmdb suffix to the db names.

Closes https://github.com/elastic/kibana/issues/196745
This commit is contained in:
Matthew Kime 2024-10-18 13:48:57 -05:00 committed by GitHub
parent bf7c5aaf29
commit f789ba61d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)',
}),