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] Properly Extract and Inject references of by value panels #92900

Closed
crob611 opened this issue Feb 25, 2021 · 2 comments · Fixed by #96095
Closed

[Dashboard] Properly Extract and Inject references of by value panels #92900

crob611 opened this issue Feb 25, 2021 · 2 comments · Fixed by #96095
Assignees
Labels
Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.13.0

Comments

@crob611
Copy link
Contributor

crob611 commented Feb 25, 2021

In #91567 we added some extracts to the common factories so that dashboards get proper references when saving them.

Those injects did no properly remove the references from the given state because we could have issues arise with name conflicts between two references. (Ex, a visualize index-pattern is always given the same name, so having two visualizations in a dashboard, extracting the index-patterns and altering the state, we wouldn't be able to properly piece them back together.

We should, in dashboard, handle this and maybe prefix the reference with the panel-id, or something like that, so we can pass the proper references back to inject to piece things back together properly.

@crob611 crob611 added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.13.0 labels Feb 25, 2021
@elasticmachine
Copy link
Contributor

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

@crob611 crob611 self-assigned this Feb 25, 2021
@ppisljar
Copy link
Member

ppisljar commented Mar 24, 2021

Agreed, if there is something unique you can prepend it with that would be perfect. If not, in expressions we use just sequential number (for example functions from 1 to x). we know that the order of functions is gonna be the same when saving as when loading so this works for us. Makes it easier however to break it if somebody would manually manipulate the saved object (which we don't recommend or support)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.13.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants