mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[data.search] Remove warning toast (#117252)
* [data.search] Remove toast notification for warnings * Update docs * Review feedback Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
5ffec0bd2c
commit
ed19a9c1a9
2 changed files with 2 additions and 12 deletions
|
@ -71,7 +71,7 @@ export interface IKibanaSearchResponse<RawResponse = any> {
|
|||
isRestored?: boolean;
|
||||
|
||||
/**
|
||||
* Optional warnings that should be surfaced to the end user
|
||||
* Optional warnings returned from Elasticsearch (for example, deprecation warnings)
|
||||
*/
|
||||
warning?: string;
|
||||
|
||||
|
|
|
@ -16,17 +16,7 @@ import { getNotifications } from '../../services';
|
|||
import { SearchRequest } from '..';
|
||||
|
||||
export function handleResponse(request: SearchRequest, response: IKibanaSearchResponse) {
|
||||
const { rawResponse, warning } = response;
|
||||
if (warning) {
|
||||
getNotifications().toasts.addWarning({
|
||||
title: i18n.translate('data.search.searchSource.fetch.warningMessage', {
|
||||
defaultMessage: 'Warning: {warning}',
|
||||
values: {
|
||||
warning,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
const { rawResponse } = response;
|
||||
|
||||
if (rawResponse.timed_out) {
|
||||
getNotifications().toasts.addWarning({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue