-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Move all dashboard extract/inject into persistable state #96095
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
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.
Only code owner review.
Didn't test.
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
From a quick read-through the code all LGTM. Tested the following scenarios locally in Chrome:
-
Save a dashboard with a by ref panel. Ensure it loads properly. Ensure the saved object of the panel is referenced when viewing the dashboard's relationships
-
Save a dashboard with a by value panel. Ensure it loads properly. Ensure any references from that nested by value embeddable are referenced when viewing the dashboard's relationship.
-
Ensure an already existing 7.12 dashboard loads properly and doesn't need any changes to continue to function properly.
-
Imported a dashboard from 7.11, and saw that after saving all of the references were updated to the new format
Overall, everything works as expected!
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
…lastic#96095) * Move all dashboard inject/extract to be part of embeddable persistable state * Fixes typescript errors * Remove comments * Fixes test * API Doc changes * Fix integration tests * Fix functional testS * Fix unit tests * Update Dashboard plugin API to get dashboard embeddable renderer * Fix Types Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…96095) (#96827) * Move all dashboard inject/extract to be part of embeddable persistable state * Fixes typescript errors * Remove comments * Fixes test * API Doc changes * Fix integration tests * Fix functional testS * Fix unit tests * Update Dashboard plugin API to get dashboard embeddable renderer * Fix Types Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Corey Robertson <corey.robertson@elastic.co>
Closes #92900
Summary
This moves the dashboard references extract/inject logic into its embeddable factory as part of the Embeddable Persistable State interface and properly names the references so there is no chance of overlap (#92900)
Because there are existing dashboard migrations that run the extract/inject logic server side, I had to introduce the dashboard embeddable server side as well to ensure the same extract/inject logic happens there as well.
Because importing a saved object immediately runs it through the saved object save process, a pre 7.3 dashboard could cause problems, as was previously fixed by #94332. So, we kept the existing "pull out the saved object references" logic as well specifically for the fallback for those older dashboard versions that will fail if run through the persistable state extract/inject.
Testing
Important areas to test around this PR