-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][TSVB] Ad-hoc dataViews for index pattern string mode in TSVB. #143500
[Lens][TSVB] Ad-hoc dataViews for index pattern string mode in TSVB. #143500
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, changed logic when navigate from Discover works correctly.
Checked on main branch. Typing data view name in string mode doesn't give an error toast on each change. tsvb.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a problem: as in each change of model, we execute convert to lens logic, we will create a new ad hoc dataview on each typing action in index pattern field. It will lead to creation a lot of useless ad hoc dataviews in cache. Two possible way to resolve problem:
- Move logic related to create ad hoc dataview to lens side
- Create ad hoc dataview only when user click on "Edit in Lens" button
# Conflicts: # src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
@flash1293, that is how convertors are built and observation of "canNavigateToLens" on every change, and there is no way of fixing this. Can you explain, please, what you expect to see as a solution? |
@Kunzetsov You already introduced an "adhoc data view cache" in the conversion logic, right? Could we just keep it around instead of resetting it? |
@flash1293, To be honest, we can't.
|
Fair considerations @Kunzetsov As it turned out the same issue occurs in other places as well, I will create an issue to solve it in the right place. However, we can't merge this before it's fixed as it will wreak havoc on more complex TSVB-heavy dashboards (performance wise) |
@flash1293, ok, will be waiting for the updates. |
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @VladLasitsa @Kunzetsov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested around and everything works fine for me now, LGTM
Summary
Completes part of #138236.
Added support of ad-hoc dataViews while converting TSVB visualizations, when index pattern string mode is turned on.