-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Return to dashboard after editing embeddable #62865
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
Merged
ThomThomson
merged 26 commits into
elastic:master
from
ThomThomson:dashboard/visEditRedirect
May 5, 2020
Merged
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
4060495
updated to match the NP migration
ThomThomson d0360f1
Made the edit panel action apply an originating app argument instead …
ThomThomson a4a7767
i8n and wording changes for Visualize top nav
ThomThomson 33ff0e3
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson 9d05fe3
fixing jest tests
ThomThomson a8a2f4a
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson e7b8b47
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson 0873c99
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson 60340a9
standardized editing and create new flow with an 'originatingApp
ThomThomson a6d311d
added redirect to origin functionality to lens
ThomThomson b849857
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson 12248c3
added and fixed functional and jest tests
ThomThomson 5ee17fe
more functional / jest test fixes
ThomThomson 898a47c
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson def2506
removed unused translations, switched checks
ThomThomson 2856ab4
fixed an issue with test_subjects.ts where eui switches always return…
ThomThomson 679a335
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson 0f9e8d5
undid changes to application start, removed originatingApp variable f…
ThomThomson 485ee5a
cleaned dif
ThomThomson 70a2a5f
Added application service to dashboard tests
ThomThomson 3e5d9dc
null checks for application start in edit panel and visualize embedda…
ThomThomson f09d67e
Merge branch 'master' of github.com:elastic/kibana into dashboard/vis…
ThomThomson a2fa6b3
fixed typo, added save and return label to origin save modal
ThomThomson 35ac231
cleaned up subscription with take(1) and fixed an oops
ThomThomson dd1ddc6
changed visualize_embeddable_factory to subscribe and unsubscribe dur…
ThomThomson bcac17c
Merge branch 'master' into dashboard/visEditRedirect
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think we have to somehow unsubscribe here, otherwise will get a memory leak
maybe we could just
.pipe(first())to make sure it unsubscribed itself (if that is sufficient)same here: https://github.com/elastic/kibana/pull/62865/files#diff-85e9be7a6b60df87e48500d65f596d1aR101
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.
Oh, good eye. The subscription in
edit_panel_actionI've cleaned up by using a pipe as suggested.The subscription in
visualize_embeddable_factoryis a little different, as it needs to update correctly when the app id changes. To unsubscribe that, I have a method in the factory calledunsubscribeSubscriptions. The plugin keeps a reference to the factory, then calls that method in itsstopmethod. This was the best way I could think of to clean up that subscription.Uh oh!
There was an error while loading. Please reload this page.
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.
The
this.application.currentAppId$is actually aBehaviorSubjectit always has a value and it can be accessed synchronously.My guess is that you should be able to do
where
🤞