Skip to content

Introduce alias support for index pattern#10075

Merged
ruflin merged 5 commits intoelastic:masterfrom
ruflin:index-pattern-alias-support
Jan 21, 2019
Merged

Introduce alias support for index pattern#10075
ruflin merged 5 commits intoelastic:masterfrom
ruflin:index-pattern-alias-support

Conversation

@ruflin
Copy link
Copy Markdown
Contributor

@ruflin ruflin commented Jan 15, 2019

The goal of this PR is that in case an alias is detected in the fields.yml, for the index pattern the fields from the original are copied over.

@ruflin ruflin added in progress Pull request is currently in progress. libbeat :Dashboards ecs labels Jan 15, 2019
@ruflin ruflin requested a review from a team as a code owner January 15, 2019 12:43
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method Fields.GetField should have comment or be unexported

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simitt Is there a good way to generate these files? I'm fighting to get the tests passing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simitt Is there a good way to generate these files? I'm fighting to get the tests passing.

Copy link
Copy Markdown
Contributor

@simitt simitt Jan 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruflin you were asking how you could make the alias show up in the fieldFormat section of the Kibana index pattern. This is the entry point for handling them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the way I make it show up fieldsFormat: https://github.com/elastic/beats/pull/10075/files#diff-086ab841dd8317d2aeec5107211984c2R87 Running it against Kibana this trick seems to work. My problem is with the tests and fieldFormatMap

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't recall a good way for creating the tests automatically.

@exekias
Copy link
Copy Markdown
Contributor

exekias commented Jan 16, 2019

I pushed a commit that I think fixes this, please take a look, I had to change part of the test data as I think something was missing

Copy link
Copy Markdown
Contributor Author

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Unfortunately I can't approve it with a checkbox as Github tells me it's my own :-) We should probably also add a changelog entry?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost forgot that part.

@ruflin ruflin added review and removed in progress Pull request is currently in progress. labels Jan 18, 2019
ruflin and others added 4 commits January 18, 2019 15:37
The goal of this PR is that in case an alias is detected in the fields.yml, for the index pattern the fields from the original are copied over.
@ruflin ruflin force-pushed the index-pattern-alias-support branch from 58b0b63 to e170ba6 Compare January 18, 2019 14:38
@ruflin ruflin merged commit b292ba2 into elastic:master Jan 21, 2019
@ruflin ruflin deleted the index-pattern-alias-support branch January 21, 2019 07:47
@ruflin ruflin self-assigned this Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants