[Discover] Extend DiscoverNoResults component to show different message on error#79671
Conversation
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
…-06-discover-add-static-error-message
… of github.com:kertal/kibana into kertal-pr-2020-10-06-discover-add-static-error-message
src/plugins/discover/public/application/angular/directives/no_results.tsx
Outdated
Show resolved
Hide resolved
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
|
@elasticmachine merge upstream |
… of github.com:kertal/kibana into kertal-pr-2020-10-06-discover-add-static-error-message
|
How about: We encountered an error retrieving your search results Button: Show error message |
|
|
The cluster is on fire! :-D |
|
@elasticmachine merge upstream |
1 similar comment
|
@elasticmachine merge upstream |
majagrubic
left a comment
There was a problem hiding this comment.
Tested this in Chrome on Mac OS according to instructions. Works as expected. A few code comments below.
src/plugins/discover/public/application/angular/directives/no_results.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/angular/directives/no_results.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/angular/directives/no_results.tsx
Outdated
Show resolved
Hide resolved
@majagrubic thx, yes, makes sense to clean it up a bit further when touching this code. will adapt! |
src/plugins/discover/public/application/angular/directives/no_results.tsx
Outdated
Show resolved
Hide resolved
| $scope.rows = []; | ||
| $scope.fetchError = error; | ||
|
|
||
| data.search.showError(error); |
There was a problem hiding this comment.
There's an annoying problem here, that if the error is a SearchTimeoutError - it's won't show again.
I'm not sure it's worth fixing, but at least it might be worth documenting.
There was a problem hiding this comment.
It's just displayed once in a session?
There was a problem hiding this comment.
@lizozom but the error is displayed in the toast, right?
There was a problem hiding this comment.
Yeah, but that popover will be displayed only once. Since you're re-calling shower to, it doesn't get shown. Not sure if I have a good proposition for fixing it, but I don't think it's critical.
There was a problem hiding this comment.
I see, so the replay doesn't work, also think it's not critical, the button is an additional option if you have missed the toast. would be interesting why it's just callable once.
lizozom
left a comment
There was a problem hiding this comment.
Tested with all types of errors I have stored.
LGTM.
…-06-discover-add-static-error-message
src/plugins/discover/public/application/components/no_results/no_results.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/no_results/no_results.tsx
Outdated
Show resolved
Hide resolved
…no_results.tsx Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
…no_results.tsx Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
andreadelrio
left a comment
There was a problem hiding this comment.
Design changes LGTM
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
History
To update your PR or re-run it, just comment with: |
…ge on error (elastic#79671) Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
…arm-phase-to-formlib * 'master' of github.com:elastic/kibana: (55 commits) [UX] Fix map color variance and apply proper filter for extended stats (elastic#81106) [User Experience] Use EuiSelect for percentiles instead of SuperSelect (elastic#81082) [DOCS] Add link for monitoring ssl settings (elastic#81057) [test] Await loading indicator in monitoring test (elastic#81279) [ILM] Minor copy and link additions to cloud CTA for cold phase (elastic#80512) [Mappings editor] Add scaled_float and date_range comp integration tests (elastic#81287) [Discover] Deangularize context.app (elastic#80851) [O11y Overview] Add code to display/hide UX section when appropriate (elastic#80873) [Discover] Extend DiscoverNoResults component to show different message on error (elastic#79671) Fix tagcloud word overlapping (elastic#81161) [Security Solution] Fixes flaky test rules (elastic#81040) Changed the code to avoid tech debt with hacky solutions after receiving comments on EUI issue reported about this problem. (elastic#81183) [Security Solution][All] Replace old markdown renderer with the new one (elastic#80301) Add namespaced version of the API call (elastic#81278) [ML] Data Frame Analytics: Fix race condition and support for feature influence legacy format. (elastic#81123) [Fleet] Fix POLICY_CHANGE action creation for new policy (elastic#81236) [Security Solution][Endpoint][Admin] Malware user notification checkbox (elastic#78084) [SecuritySolution][Unit Tests] - fix flakey unit test (elastic#81239) skip flaky suite (elastic#81264) [Maps] fix top-level Map page is called 'Kibana' (elastic#81238) ... # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared/forcemerge_field.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/warm_phase.tsx

Summary
With the alignment of error notification in PR #77788 all error messages in Discover were migrated to be a toast. This could be misleading when there's an error and the no-results page is displayed:
This PR displays a different message in the error case
Furthermore this PR converts
DiscoverNoResultsto TypeScript, modularizes the component, migrates testing to no longer use snapshots of the whole component, and moves the whole component out of theangularfolder.Testing
logs*index pattern. Add data to thelogsindexlogsindex pattern, adapt time rangeChecklist