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 service instead saved object client #73306

Closed
flash1293 opened this issue Jul 27, 2020 · 2 comments · Fixed by #74654
Closed

[Lens] Use index pattern service instead saved object client #73306

flash1293 opened this issue Jul 27, 2020 · 2 comments · Fixed by #74654
Assignees
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

flash1293 commented Jul 27, 2020

In https:/flash1293/kibana/blob/7e533f26aa0f0ca6029834e53ab00fdb0c590f15/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#L46 Lens is using the saved object client directly to fetch index patterns instead of using the indexPatterns service provided by the data plugin.

This means Lens is missing some integrations the index pattern service handles (e.g. caching and dotted field names), and won't integrate without custom work with changes like #73021 (comment)

By switching to the index pattern service to fetch index patterns inside Lens, we can simplify some aspects of the loading. The change can very likely be contained within the loader function.

Part of this PR should also be to use the displayName property of fields instead of the raw field name (#73306)

@flash1293 flash1293 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jul 27, 2020
@elasticmachine
Copy link
Contributor

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

@wylieconlon
Copy link
Contributor

Let's make sure to consider how Lens is handling rollup information: we have a structure called aggregationRestrictions which is not the same as the rollup information in the index pattern service.

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

Successfully merging a pull request may close this issue.

4 participants