-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Navigate from discover to lens #77873
Merged
stratoula
merged 25 commits into
elastic:master
from
stratoula:navogate-discover-to-lens
Oct 6, 2020
Merged
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
f2c3e56
Create lens action and unregister the visualize one
stratoula 278e51b
remove console
stratoula a8a7591
Implement Discover to Lens, wip, missing tests
stratoula c018989
Add unit tests
stratoula 39992f5
Merge branch 'master' into navogate-discover-to-lens
elasticmachine 80e56ae
fix embed lens to empty dashboard functional tests
stratoula 03b5cb9
fix suggestions on save
stratoula 601361b
Fix bug on save button, query and filters should be transferred from …
stratoula bf30921
resolve conflicts
stratoula b50e628
Add functional test for the navigation from Discover to Lens
stratoula 0f48077
Merge branch 'master' into navogate-discover-to-lens
stratoula 1519f93
PR update after code review
stratoula ff28aee
Merge branch 'master' into navogate-discover-to-lens
elasticmachine 89c8662
unregister visualize action only if the action exists
stratoula caaed27
Change the test to not be flaky
stratoula 2f949fe
Merge branch 'master' into navogate-discover-to-lens
elasticmachine 83da4fa
Move suggestions to editor frame and hide the emptyWorkspace for visu…
stratoula eedc7bb
resolve conflicts and merge with master
stratoula bd09d21
Merge branch 'master' into navogate-discover-to-lens
elasticmachine 5e62b42
Update ui actions docs
stratoula 92d512b
Merge branch 'master' into navogate-discover-to-lens
elasticmachine 32dd2bd
Add a retry to remove test flakiness
stratoula 35b8297
Merge branch 'navogate-discover-to-lens' of https://github.com/strato…
stratoula a27df91
Fix bug of infinite loader when removing the y axis dimension
stratoula d5e6b68
Merge branch 'master' into navogate-discover-to-lens
kibanamachine 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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,9 @@ import { | |
LensByReferenceInput, | ||
LensByValueInput, | ||
} from '../editor_frame_service/embeddable/embeddable'; | ||
import { ACTION_VISUALIZE_LENS_FIELD } from '../../../../../src/plugins/ui_actions/public'; | ||
import { LensAttributeService } from '../lens_attribute_service'; | ||
import { LensAppServices, RedirectToOriginProps } from './types'; | ||
import { LensAppServices, RedirectToOriginProps, HistoryLocationState } from './types'; | ||
import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public'; | ||
|
||
export async function mountApp( | ||
|
@@ -46,6 +47,7 @@ export async function mountApp( | |
const instance = await createEditorFrame(); | ||
const storage = new Storage(localStorage); | ||
const stateTransfer = embeddable?.getStateTransfer(params.history); | ||
const historyLocationState = params.history.location.state as HistoryLocationState; | ||
const embeddableEditorIncomingState = stateTransfer?.getIncomingEditorState(); | ||
|
||
const lensServices: LensAppServices = { | ||
|
@@ -132,6 +134,11 @@ export async function mountApp( | |
onAppLeave={params.onAppLeave} | ||
setHeaderActionMenu={params.setHeaderActionMenu} | ||
history={routeProps.history} | ||
initialContext={ | ||
historyLocationState && historyLocationState.type === ACTION_VISUALIZE_LENS_FIELD | ||
? historyLocationState.payload | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is okay, but I was almost expecting the entire |
||
: undefined | ||
} | ||
stratoula marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/> | ||
); | ||
}; | ||
|
This file contains 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 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 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 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 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.
So if I understand this correctly, this is using the same trigger, but different action for Lens- this sounds like what we agreed.
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.
Yes, exactly same trigger
VISUALIZE_FIELD_TRIGGER
but different action!