-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Add modal with details to shard error toast #41649
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
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
dd3f5a8
Add details to shard error toast
kertal 89cbbde
Implement failure modal with lots of details
kertal 887447d
Merge remote-tracking branch 'upstream/master' into kertal-pr-shard-e…
kertal 6b6a82b
Rename types file tsx to ts
kertal 52575a0
Convert styles to SCSS
kertal 0b28a3a
Add jest test for rendering modal
kertal f391153
Update core API change
kertal 377311c
Merge remote-tracking branch 'upstream/master' into kertal-pr-shard-e…
kertal 63b581d
Fix duplicate translation
kertal 6184c1d
Add more jest tests
kertal 2191575
Convert mock json to typescript
kertal 40b1b9b
SCSS adaptions
kertal 42bdbcb
Merge remote-tracking branch 'upstream/master' into kertal-pr-shard-e…
kertal 43c14b3
Fix SCSS !important usage
kertal 03bffa4
Use EuiSpacer to set margin of description header
kertal 9a68a57
Remove unused EuiCodeEditor
kertal 7e4127e
Refactoring for better accessibility
kertal 3d70f70
Add license header to description_header
kertal 90f8556
Add i18n to the component failure msg
kertal 20fbfbd
Remove SCSS hack that will fixed by EUI upgrade
kertal 24061f8
Remove another codeblock SCSS class
kertal e1d82fe
Remove hard coded width of codeblock
kertal 448dd5a
Set size of button starting the modal to 's'
kertal d53ce40
Update snapshot
kertal fe6104d
Add additional Text to Warning Toast
kertal 683df23
Add missing key to header components mapping
kertal 437ed38
Cleanup of ShardFailureModal
kertal 979623d
Cleanup of ShardFailureDescription
kertal 79c80a3
Cleanup of ShardFailureDescriptionHeader
kertal bbaad1f
Translate table column header
kertal f8a4036
Convert any types to unknown
kertal f2f8d5a
Reformat description header
kertal 0f8c0b0
Update snapshot tests
kertal 102d495
IE11 DescriptionList width fix
kertal ecce5e8
Merge remote-tracking branch 'upstream/master' into kertal-pr-shard-e…
kertal 23e26b0
Remove unused EuiTitle
kertal ca6b3fb
Improve ShardFailureDescriptionHeader component
kertal c4b1440
Improving the button starting the modal
kertal 893dfc1
SCSS formatting fix
kertal 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @import './fetch/components/shard_failure_modal'; |
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
32 changes: 32 additions & 0 deletions
32
src/legacy/ui/public/courier/fetch/components/__mocks__/shard_failure_request.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| import { Request } from '../shard_failure_types'; | ||
| export const shardFailureRequest = { | ||
| version: true, | ||
| size: 500, | ||
| sort: [], | ||
| _source: { | ||
| excludes: [], | ||
| }, | ||
| stored_fields: ['*'], | ||
| script_fields: {}, | ||
| docvalue_fields: [], | ||
| query: {}, | ||
| highlight: {}, | ||
| } as Request; |
46 changes: 46 additions & 0 deletions
46
src/legacy/ui/public/courier/fetch/components/__mocks__/shard_failure_response.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| import { ResponseWithShardFailure } from '../shard_failure_types'; | ||
|
|
||
| export const shardFailureResponse = { | ||
| _shards: { | ||
| total: 2, | ||
| successful: 1, | ||
| skipped: 0, | ||
| failed: 1, | ||
| failures: [ | ||
| { | ||
| shard: 0, | ||
| index: 'repro2', | ||
| node: 'itsmeyournode', | ||
| reason: { | ||
| type: 'script_exception', | ||
| reason: 'runtime error', | ||
| script_stack: ["return doc['targetfield'].value;", ' ^---- HERE'], | ||
| script: "return doc['targetfield'].value;", | ||
| lang: 'painless', | ||
| caused_by: { | ||
| type: 'illegal_argument_exception', | ||
| reason: 'Gimme reason', | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| } as ResponseWithShardFailure; |
192 changes: 192 additions & 0 deletions
192
.../ui/public/courier/fetch/components/__snapshots__/shard_failure_description.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.