From 6d2970e7081213df3913cd8dae50d73f04208e6f Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 10 Sep 2024 14:55:32 -0700 Subject: [PATCH] [Manual backport] Update report with many records warning (#431) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Feature] Add the ability to configure record limit/count from the UI (#395) * feat(components/report-settings): add field for variable record limits Signed-off-by: Károly Szakály * fix(components/report-settings): set type for event target Signed-off-by: Károly Szakály * feat(components/report-settings): load existing record limit in edit mode Signed-off-by: Károly Szakály * feat(components/report-definition-details): show record limit on report definition details page Signed-off-by: Károly Szakály * feat(components/report-definition-details): omit record limit for non saved search sources Signed-off-by: Károly Szakály * feat(components/report-details): show record limit on report details page Signed-off-by: Károly Szakály * tests(cypress): add `force: true` to name input Signed-off-by: Károly Szakály * tests(jest/snapshots): update snapshots Signed-off-by: Károly Szakály * feat(components/report-settings): add proper i18n label for record limit input Signed-off-by: Károly Szakály * Update release notes Signed-off-by: Simeon Widdis * Add potential OOM warning for large record limits Signed-off-by: Simeon Widdis * Make memory warning more conservative based on original limit Signed-off-by: Simeon Widdis --------- Signed-off-by: Károly Szakály Signed-off-by: Simeon Widdis Co-authored-by: Simeon Widdis * Fix merge conflict markers Signed-off-by: Simeon Widdis * Update large record report warning (#429) Signed-off-by: Simeon Widdis * Merge 2.x Signed-off-by: Simeon Widdis --------- Signed-off-by: Károly Szakály Signed-off-by: Simeon Widdis Co-authored-by: Károly Szakály --- .../report_settings/report_settings.tsx | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/public/components/report_definitions/report_settings/report_settings.tsx b/public/components/report_definitions/report_settings/report_settings.tsx index 4f008d07..a48d2f42 100644 --- a/public/components/report_definitions/report_settings/report_settings.tsx +++ b/public/components/report_definitions/report_settings/report_settings.tsx @@ -6,23 +6,13 @@ import React, { useEffect, useState } from 'react'; import { i18n } from '@osd/i18n'; import { - EuiFieldText, EuiFieldNumber, - EuiFlexGroup, - EuiFlexItem, - EuiFormRow, - EuiPageHeader, - EuiTitle, - EuiPageContent, - EuiPageContentBody, - EuiHorizontalRule, EuiSpacer, EuiRadioGroup, - EuiTextArea, EuiCheckboxGroup, EuiComboBox, - EuiText, - EuiIcon, + EuiFormRow, + EuiCallOut, } from '@elastic/eui'; import { REPORT_SOURCE_RADIOS, @@ -800,22 +790,26 @@ export function ReportSettings(props: ReportSettingProps) { /> + {savedSearchRecordLimit > 10000 ? ( + <> + + + + ) : null} 10000 ? ( - - Generating - very large reports can cause memory issues. - - ) : ( - '' - ) - } >