Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ip location processor] Add mmdb suffix to db file names
(#196788)](#196788)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Matthew
Kime","email":"matt@mattki.me"},"sourceCommit":{"committedDate":"2024-10-18T18:48:57Z","message":"[ip
location processor] Add mmdb suffix to db file names (#196788)\n\n##
Summary\r\n\r\nSimply adds the mmdb suffix to the db
names.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196745","sha":"f789ba61d4ca675bf6ea35f4c1f5fb033363e06a","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","v9.0.0","Feature:Ingest Node
Pipelines","backport:prev-minor","v8.16.0","backport:version","v8.17.0"],"title":"[ip
location processor] Add mmdb suffix to db file
names","number":196788,"url":"https://github.com/elastic/kibana/pull/196788","mergeCommit":{"message":"[ip
location processor] Add mmdb suffix to db file names (#196788)\n\n##
Summary\r\n\r\nSimply adds the mmdb suffix to the db
names.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196745","sha":"f789ba61d4ca675bf6ea35f4c1f5fb033363e06a"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196788","number":196788,"mergeCommit":{"message":"[ip
location processor] Add mmdb suffix to db file names (#196788)\n\n##
Summary\r\n\r\nSimply adds the mmdb suffix to the db
names.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196745","sha":"f789ba61d4ca675bf6ea35f4c1f5fb033363e06a"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Matthew Kime <matt@mattki.me>
  • Loading branch information
kibanamachine and mattkime authored Oct 18, 2024
1 parent 545e85c commit 88d5dea
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 88d5dea

Please sign in to comment.