From 35a14e8b261c74758bc463753007de000b9baf49 Mon Sep 17 00:00:00 2001 From: Lukas Olson Date: Tue, 2 Nov 2021 16:31:48 -0700 Subject: [PATCH 1/3] [data.search] Remove toast notification for warnings --- .../data/public/search/fetch/handle_response.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/plugins/data/public/search/fetch/handle_response.tsx b/src/plugins/data/public/search/fetch/handle_response.tsx index f4acebfb36060..9e68209af2b92 100644 --- a/src/plugins/data/public/search/fetch/handle_response.tsx +++ b/src/plugins/data/public/search/fetch/handle_response.tsx @@ -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({ From 5a1550b25947c8dae4fdd16dd20c1bba1ae13512 Mon Sep 17 00:00:00 2001 From: Lukas Olson Date: Tue, 2 Nov 2021 16:33:50 -0700 Subject: [PATCH 2/3] Update docs --- src/plugins/data/common/search/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/data/common/search/types.ts b/src/plugins/data/common/search/types.ts index 68a25d4c4d69d..6aa688bc54624 100644 --- a/src/plugins/data/common/search/types.ts +++ b/src/plugins/data/common/search/types.ts @@ -71,7 +71,7 @@ export interface IKibanaSearchResponse { isRestored?: boolean; /** - * Optional warnings that should be surfaced to the end user + * Optional warnings returned from Elasticsearch for deprecations */ warning?: string; From 6a6159d979c2906016baf181c99d296322448fbb Mon Sep 17 00:00:00 2001 From: Lukas Olson Date: Wed, 3 Nov 2021 10:31:04 -0700 Subject: [PATCH 3/3] Review feedback --- src/plugins/data/common/search/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/data/common/search/types.ts b/src/plugins/data/common/search/types.ts index 6aa688bc54624..e9b6160c4a75a 100644 --- a/src/plugins/data/common/search/types.ts +++ b/src/plugins/data/common/search/types.ts @@ -71,7 +71,7 @@ export interface IKibanaSearchResponse { isRestored?: boolean; /** - * Optional warnings returned from Elasticsearch for deprecations + * Optional warnings returned from Elasticsearch (for example, deprecation warnings) */ warning?: string;