display toast when saved query can not be loaded#56643
Closed
nreese wants to merge 1 commit intoelastic:masterfrom
Closed
display toast when saved query can not be loaded#56643nreese wants to merge 1 commit intoelastic:masterfrom
nreese wants to merge 1 commit intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
Closed
ppisljar
reviewed
Feb 3, 2020
| const getSavedQuery = async (id: string): Promise<SavedQuery> => { | ||
| const response = await savedObjectsClient.get<SerializedSavedQueryAttributes>('query', id); | ||
| return parseSavedQueryObject(response); | ||
| const savedObject = await savedObjectsClient.get<SerializedSavedQueryAttributes>('query', id); |
Contributor
There was a problem hiding this comment.
non blocker for this PR, but: should the services be showing toasts or should we rather return an error and the application using it can decide whether it wants to show a toast or handle the error in some other way.
Contributor
7 tasks
Contributor
💚 Build SucceededTo update your PR or re-run it, just comment with: |
lizozom
pushed a commit
to lizozom/kibana
that referenced
this pull request
Feb 3, 2020
Fix bug where saved query clean does not reset query
lizozom
pushed a commit
that referenced
this pull request
Feb 6, 2020
* Clean up discover * Clean up visualize * Clean up dashboard * use-default-behaviors * ts * Discover interval changing * timerange for interval definition in editor * ts * Revert most of changes to dashboard app because of changes in #55443 * Fix spaces * Revert editor to scope PR! * typo * keep savedQuery state in create search bar * update saved query to save it with the state * revert all dashboard changes * saved queries * @kertal code review * fix applying filters from histogram * @Dosant code review * Merge changes from #56643 to handle saved query errors Fix bug where saved query clean does not reset query * change string path * if * Extract useFilterManager and useTimefilter * Split useSavedQuery and restore capability of changing saved query in URL * Added some tests * context view * Remove useMemo * spaces * Support filter intial values Improve useSavedQuery hook in terface Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lizozom
pushed a commit
to lizozom/kibana
that referenced
this pull request
Feb 6, 2020
* Clean up discover * Clean up visualize * Clean up dashboard * use-default-behaviors * ts * Discover interval changing * timerange for interval definition in editor * ts * Revert most of changes to dashboard app because of changes in elastic#55443 * Fix spaces * Revert editor to scope PR! * typo * keep savedQuery state in create search bar * update saved query to save it with the state * revert all dashboard changes * saved queries * @kertal code review * fix applying filters from histogram * @Dosant code review * Merge changes from elastic#56643 to handle saved query errors Fix bug where saved query clean does not reset query * change string path * if * Extract useFilterManager and useTimefilter * Split useSavedQuery and restore capability of changing saved query in URL * Added some tests * context view * Remove useMemo * spaces * Support filter intial values Improve useSavedQuery hook in terface Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lizozom
pushed a commit
that referenced
this pull request
Feb 6, 2020
* Clean up discover * Clean up visualize * Clean up dashboard * use-default-behaviors * ts * Discover interval changing * timerange for interval definition in editor * ts * Revert most of changes to dashboard app because of changes in #55443 * Fix spaces * Revert editor to scope PR! * typo * keep savedQuery state in create search bar * update saved query to save it with the state * revert all dashboard changes * saved queries * @kertal code review * fix applying filters from histogram * @Dosant code review * Merge changes from #56643 to handle saved query errors Fix bug where saved query clean does not reset query * change string path * if * Extract useFilterManager and useTimefilter * Split useSavedQuery and restore capability of changing saved query in URL * Added some tests * context view * Remove useMemo * spaces * Support filter intial values Improve useSavedQuery hook in terface Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Contributor
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When working to replace
AppStatein the Maps application I noticed 2 problems with howsavedQuerywere synced to the URL._aparameter does not havesavedQueryparameter, then adding one has not effect.This PR fixes these problems by causing
savedQueryService.getSavedQueryto throw when the saved object can not be loaded. The PR also changes the logic from$scope.savedQuery && isNewIdto!$scope.savedQuery || isNewId