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

[Dashboard] Fix iFrame Filtering Issues #95997

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

ThomThomson
Copy link
Contributor

Summary

This PR fixes an issue in the dashboard router where the embed settings object is recreated any time the URL changes. This was caused by #82909.

Fixing this issue addresses many issues with dashboard filtering in an iframe:
Fixes #94465
Fixes #94467
Fixes #91590

For maintainers

@ThomThomson ThomThomson added Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort v8.0.0 impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. v7.13.0 v7.12.1 labels Mar 31, 2021
@ThomThomson ThomThomson requested a review from a team as a code owner March 31, 2021 21:25
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and seems to work well!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 147.8KB 147.9KB +82.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@yassine-ah
Copy link

Thank you @ThomThomson for the fix, the bug is critical and make the filters within embedded dashboard unused 👍

My I ask if you know when the fix will be published ?

@ThomThomson
Copy link
Contributor Author

ThomThomson commented Apr 5, 2021

@yassine-ah, this fix will be released with 7.12.1, which we are targeting so far for April 20th.

@ldefranco3434
Copy link

Is the 7.12.1 release date still planned for sometime today? Thanks.

@ThomThomson
Copy link
Contributor Author

@ldefranco3434, unfortunately the release of 7.12.1 has been delayed. It's now looking to be closer to the end of April. Apologies for the delay.

@cait-car
Copy link

Is there anything we can implement in our deployment to fix these issues with the current version?

@voidel
Copy link

voidel commented Apr 22, 2021

On the edge of my seat 👀

@yassine-ah
Copy link

@ThomThomson , thank you for the fix, I confirm that most of the issue with dashboard within iFrame were fixed but a problem still exist when using short URLs.

When I compare between the url generated after sharing the dashboard without activating the short url, I get a panels:!((...)) section that is missing from short url redirect.

I think this is the cause why I get the errors below:
image

I am available if you want me to test something or provide you with more information, do you want me to create a separated issue ?

Thanks

@ThomThomson
Copy link
Contributor Author

Hi @yassine-ah, this seems like a separate problem, and would warrant another issue if you wouldn't mind creating one. I will try to recreate this problem.

@fp185001
Copy link

@ThomThomson Migrating to 7.14.0 I've discovered a problem that seems related to this issue.
Our solution embeds inside an IFrame some shared Kibana dashboards.
Externally to IFrame we give to user's application the possibility to change the timeframe and also some query criteria inside IFrame shared Dashboard.
We have always do this renavigating on IFrame changing on url global section (_g) the timeframe, and on application section (_a) the query criteria (...query:(language:kuery,query:'....') ).
From Kibana 7.14.0 the _a section seems not reusable for updating the applied query inside dashboard: it works only on first navigation, not in the following. Change on timeframe (inside _g section of url) instead continues to works correctly.

The different behavior of 7.14.0 can be see trying to navigate on shared IFrame link with some "query" criteria in url. Once the navigation is completed the "_a" section containing the "query" disappears from url (it mantains only the "_g" section).

Exported Visualization, instead, works correctly on 7.14.0. We can update the "query" filter on url whenever we want because the "_a" section is mantained. Same behavior, after all, of shared dashboard links in previous releases.

Actually we cannot update to 7.14.0 our solution for this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.12.1 v7.13.0 v8.0.0
Projects
None yet
9 participants