-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into reporting/client-…
…np-migration
- Loading branch information
Showing
28 changed files
with
291 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...x_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
x-pack/legacy/plugins/maps/public/layers/fields/ems_file_field.js
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
x-pack/legacy/plugins/maps/public/layers/fields/ems_file_field.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { FIELD_ORIGIN } from '../../../common/constants'; | ||
import { IField, AbstractField } from './field'; | ||
import { IVectorSource } from '../sources/vector_source'; | ||
import { IEmsFileSource } from '../sources/ems_file_source/ems_file_source'; | ||
|
||
export class EMSFileField extends AbstractField implements IField { | ||
private readonly _source: IEmsFileSource; | ||
|
||
constructor({ | ||
fieldName, | ||
source, | ||
origin, | ||
}: { | ||
fieldName: string; | ||
source: IEmsFileSource; | ||
origin: FIELD_ORIGIN; | ||
}) { | ||
super({ fieldName, origin }); | ||
this._source = source; | ||
} | ||
|
||
getSource(): IVectorSource { | ||
return this._source; | ||
} | ||
|
||
async getLabel(): Promise<string> { | ||
const emsFileLayer = await this._source.getEMSFileLayer(); | ||
// TODO remove any and @ts-ignore when emsFileLayer type defined | ||
// @ts-ignore | ||
const emsFields: any[] = emsFileLayer.getFieldsInLanguage(); | ||
// Map EMS field name to language specific label | ||
const emsField = emsFields.find(field => field.name === this.getName()); | ||
return emsField ? emsField.description : this.getName(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.