-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 162768-update-rule-creation-form-design-thre…
…shold-rule
- Loading branch information
Showing
56 changed files
with
2,037 additions
and
184 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @kbn/search-response-warnings | ||
|
||
Components and utils to render warnings which happen when executing search request. For example, shard failures and time outs. |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export type { SearchResponseInterceptedWarning } from './src/types'; | ||
|
||
export { | ||
SearchResponseWarnings, | ||
type SearchResponseWarningsProps, | ||
} from './src/components/search_response_warnings'; | ||
|
||
export { | ||
getSearchResponseInterceptedWarnings, | ||
removeInterceptedWarningDuplicates, | ||
} from './src/utils/get_search_response_intercepted_warnings'; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../..', | ||
roots: ['<rootDir>/packages/kbn-search-response-warnings'], | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"type": "shared-common", | ||
"id": "@kbn/search-response-warnings", | ||
"owner": "@elastic/kibana-data-discovery" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@kbn/search-response-warnings", | ||
"private": true, | ||
"version": "1.0.0", | ||
"license": "SSPL-1.0 OR Elastic License 2.0" | ||
} |
50 changes: 50 additions & 0 deletions
50
packages/kbn-search-response-warnings/src/__mocks__/search_response_warnings.ts
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { SearchResponseWarning } from '@kbn/data-plugin/public'; | ||
|
||
export const searchResponseTimeoutWarningMock: SearchResponseWarning = { | ||
type: 'timed_out', | ||
message: 'Data might be incomplete because your request timed out', | ||
reason: undefined, | ||
}; | ||
|
||
export const searchResponseShardFailureWarningMock: SearchResponseWarning = { | ||
type: 'shard_failure', | ||
message: '3 of 4 shards failed', | ||
text: 'The data might be incomplete or wrong.', | ||
reason: { | ||
type: 'illegal_argument_exception', | ||
reason: 'Field [__anonymous_] of type [boolean] does not support custom formats', | ||
}, | ||
}; | ||
|
||
export const searchResponseWarningsMock: SearchResponseWarning[] = [ | ||
searchResponseTimeoutWarningMock, | ||
searchResponseShardFailureWarningMock, | ||
{ | ||
type: 'shard_failure', | ||
message: '3 of 4 shards failed', | ||
text: 'The data might be incomplete or wrong.', | ||
reason: { | ||
type: 'query_shard_exception', | ||
reason: | ||
'failed to create query: [.ds-kibana_sample_data_logs-2023.07.11-000001][0] Testing shard failures!', | ||
}, | ||
}, | ||
{ | ||
type: 'shard_failure', | ||
message: '1 of 4 shards failed', | ||
text: 'The data might be incomplete or wrong.', | ||
reason: { | ||
type: 'query_shard_exception', | ||
reason: | ||
'failed to create query: [.ds-kibana_sample_data_logs-2023.07.11-000001][0] Testing shard failures!', | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.