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

Visualizations request wrongly default index pattern on dashboard #105182

Closed
timroes opened this issue Jul 12, 2021 · 3 comments · Fixed by #107227
Closed

Visualizations request wrongly default index pattern on dashboard #105182

timroes opened this issue Jul 12, 2021 · 3 comments · Fixed by #107227
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@timroes
Copy link
Contributor

timroes commented Jul 12, 2021

When having a dashboard with just one TSVB visualization at it that's not using the default index pattern, TSVB will still send out a request to load the fields of the default index pattern:

screenshot-20210712-102512

In this screenshot the default index pattern is ecommerce but the vis uses logs, but as you can see we still request fields for both. The filters dialog will btw show correctly only fields from logs.

This happens no matter whether the vis uses string mode or index pattern mode.

That additional request can cause annoying permission errors, in case the users of the dashboard don't have permissions to the default index pattern, see also https://discuss.elastic.co/t/privilege-issue-opening-dashboard-always-requests-the-default-index-pattern/278274

@timroes timroes added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Jul 12, 2021
@elasticmachine
Copy link
Contributor

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

@alexwizp
Copy link
Contributor

@timroes For me it looks more like a Dashboard problem. I think the root cause of that issue in lazy initialization of embeddable visualizations, as a result, at the initial moment we do not have an understanding of which indexes will be used. And then after the visualization is ready we update our state. This might explain the query for getting the default index

To test my theory, I created a new dashboard with two classic visualizations (not TSVB!) and added a console.log in src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts. Let's see what we got:

image

Logic happens 3 times and for first one we load a default index. See next condition

image

Last screen in a manner which you did for description. Absolutely the same but without TSVB
image

I think it's not so difficult to fix, but @ThomThomson can someone from your team take this one?

@timroes timroes added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Feature:TSVB TSVB (Time Series Visual Builder) labels Jul 13, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@stratoula stratoula added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Jul 21, 2021
@timroes timroes added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Jul 22, 2021
@stratoula stratoula changed the title TSVB requests wrongly default index pattern on dashboard Visualizations request wrongly default index pattern on dashboard Jul 27, 2021
@kibanamachine kibanamachine added the loe:needs-research This issue requires some research before it can be worked on or estimated label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants