New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Static Lookup field formatter #19637

Merged
merged 2 commits into from Jun 27, 2018

Conversation

Projects
None yet
5 participants
@ycombinator
Contributor

ycombinator commented Jun 2, 2018

Resolves partially #5009.

This PR adds a field formatter for a static lookup table/map. Adding dynamic lookup (given a lookup index pattern + key/value fields) might be a bit more involved so I think we should address that in a follow up PR.

Screenshots

Defining the lookup table via the "Static Lookup" field formatter

screen shot 2018-06-02 at 12 02 15 pm

screen shot 2018-06-02 at 12 02 51 pm

Results in Discover

screen shot 2018-06-02 at 12 02 41 pm

When a value is specified for unknown keys

screen shot 2018-06-02 at 12 03 04 pm

screen shot 2018-06-02 at 12 03 18 pm

@ycombinator

This comment has been minimized.

Contributor

ycombinator commented Jun 2, 2018

/cc @skearns64 @tbragin @elastic/kibana-management @epixa for your comments/review.

If/when we're happy with the functionality of this field formatter, I'll add tests to this PR.

@elasticmachine

This comment has been minimized.

elasticmachine commented Jun 2, 2018

@chrisronline

This comment has been minimized.

Contributor

chrisronline commented Jun 4, 2018

@jen-huang Are you working on moving the field format editing page to React? This might affect this PR

@jen-huang

This comment has been minimized.

Contributor

jen-huang commented Jun 5, 2018

Thanks for the ping @chrisronline. This PR might get merged before my React work does; it's not much work to convert one editor to React so I can do that with my PR after this goes in.

@jen-huang

Code review only; LGTM

@bmcconaghy

LGTM, pulled it down and played around with it and it seems solid.

@jen-huang

This comment has been minimized.

Contributor

jen-huang commented Jun 26, 2018

The PR for Reactifying field editors is up: #20245

I think the functionality of this editor is most like ColorFormatEditor with regards to adding/removing rows of options:
https://github.com/jen-huang/kibana/blob/84523791111881eed1495999cabce407cbe2f34e/src/ui/public/field_editor/components/field_format_editor/editors/color/color.js

screen shot 2018-06-26 at 1 37 09 pm

@ycombinator if you want to merge this ahead of my PR, I'm happy to convert it with my changes. Or you can convert if mine goes in before this 🙂

@ycombinator ycombinator force-pushed the ycombinator:field-formatter/lookup branch from 1105645 to b5f5db3 Jun 26, 2018

@ycombinator

This comment has been minimized.

Contributor

ycombinator commented Jun 26, 2018

Thanks for the heads up @jen-huang. I'd forgotten about this PR 😄😛.

@elasticmachine

This comment has been minimized.

elasticmachine commented Jun 26, 2018

@elasticmachine

This comment has been minimized.

elasticmachine commented Jun 27, 2018

@ycombinator ycombinator merged commit ad44ae9 into elastic:master Jun 27, 2018

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
kibana-ci Build finished.
Details

@ycombinator ycombinator deleted the ycombinator:field-formatter/lookup branch Jun 27, 2018

@ycombinator

This comment has been minimized.

Contributor

ycombinator commented Jun 27, 2018

Backported to:

ycombinator added a commit that referenced this pull request Jun 27, 2018

Add a Static Lookup field formatter (#19637)
* Add static lookup field formatter

* Adding field formatter ID to test IDs

mattapperson added a commit that referenced this pull request Jun 28, 2018

Add a Static Lookup field formatter (#19637)
* Add static lookup field formatter

* Adding field formatter ID to test IDs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment