-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Update embeddables metadata to support multiple index patterns #31538
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
Conversation
|
Pinging @elastic/kibana-app |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
src/legacy/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_factory.ts
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/discover/embeddable/search_embeddable.ts
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/dashboard/dashboard_state_manager.js
Outdated
Show resolved
Hide resolved
| if (indexPattern) { | ||
| this.panelIndexPatternMapping[panelId] = indexPattern; | ||
| const embeddableMetadata = getEmbeddableMetadata(store.getState(), panelId); | ||
| if (embeddableMetadata.indexPatterns) { |
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.
Could getEmbeddableMetadata return null (even though this wasn't handled in the previous version)?
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.
No, metadata is defaulted to {} if nothing is provided.
https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/embeddable/embeddable.ts#L52
💔 Build Failed |
|
@lizozom Looks like TS linter does not like |
💚 Build Succeeded |
src/legacy/core_plugins/kibana/public/dashboard/dashboard_state.test.js
Outdated
Show resolved
Hide resolved
…WithIndexPatterns
lukasolson
left a comment
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.
LGTM
💚 Build Succeeded |
…ic#31538) * Update embeddables metadata to support multiple index patterns * ts lint errors * another try at ts lint errors * fix dashboard_state tests * use lodash compact to remove undefined * revert _.compact to make TS linter happy * rename simulateNewEmbeddableWithIndexPattern => simulateNewEmbeddableWithIndexPatterns
… (#31820) * Update embeddables metadata to support multiple index patterns * ts lint errors * another try at ts lint errors * fix dashboard_state tests * use lodash compact to remove undefined * revert _.compact to make TS linter happy * rename simulateNewEmbeddableWithIndexPattern => simulateNewEmbeddableWithIndexPatterns
This PR updates
EmbeddableMetadatato allow an embeddable to support multiple index patterns. The Maps application is working on a newEmbeddableimplementation. A map embeddable could include 0 to many index patterns