Skip to content
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

[Lens] Use index pattern field property displayName #73021

Closed
kertal opened this issue Jul 23, 2020 · 6 comments
Closed

[Lens] Use index pattern field property displayName #73021

kertal opened this issue Jul 23, 2020 · 6 comments
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kertal
Copy link
Member

kertal commented Jul 23, 2020

Describe the feature:
Index pattern fields offer the property displayName.

This is currently not used in Lens. Once #69908 is implemented, this property is customizable by the user. Note that this property is currently customizing the name given the ui setting shortenDottedString is enabled, like currently in Discover.

obj.comp('displayName', shortDotsEnable ? shortenDottedString(spec.name) : spec.name);

Describe a specific use case for the feature:
E.g long fieldnames, there are lots of them in beats submitted data, could be customized (given #69908 is done)

@wylieconlon
Copy link
Contributor

@kertal it looks like in the current implementation, displayName is a property of the index pattern service which is not persisted with the saved object. Lens is currently set up to read from the saved object directly. Are you planning on moving displayName to the saved object?

@wylieconlon wylieconlon added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jul 23, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@kertal
Copy link
Member Author

kertal commented Jul 23, 2020

in my current PoC I called the persisted property label, so there will be a persisted property that's accessible for Lens. Makes sense to adapt after finishing #70039

@wylieconlon
Copy link
Contributor

@kertal that sounds like it would be easy to integrate into Lens, since there would be something in the saved object.

@timroes
Copy link
Contributor

timroes commented Jul 27, 2020

Why are we using the saved object directly in Lens, instead of consuming the instantiated index pattern class? Even with that label being present, ideally we should leave that decision to the index pattern implementation and not need to re-implement that in Lens. The main reason why solutions didn't consume the index pattern service was that it only ran on the frontend (yet) and not on the serverside, but we don't have that requirement for Lens (yet)?

@flash1293
Copy link
Contributor

As discussed offline, it makes more sense to switch to the index pattern service when fixing this instead of using the next internal. I opened a separate issue for this: #73306

Closing this one because the other one should include all necessary information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

5 participants