[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.#143500VladLasitsa merged 33 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
|
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.
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
|
I think I like the first approach here, passing the spec to Lens instead of the id |
|
@elastic/kibana-vis-editors, could you, please, review this PR? Thanks. |
# Conflicts: # src/plugins/vis_types/timeseries/public/convert_to_lens/gauge/index.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/index.test.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/index.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.test.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/timeseries/index.test.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/timeseries/index.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/top_n/index.test.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/top_n/index.ts # src/plugins/vis_types/timeseries/public/convert_to_lens/types.ts # src/plugins/vis_types/timeseries/public/metrics_type.ts
# Conflicts: # src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.ts
@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 |
flash1293
left a comment
There was a problem hiding this comment.
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.