Skip to content

Commit

Permalink
[Manual backport] Update report with many records warning (#430)
Browse files Browse the repository at this point in the history
Signed-off-by: Simeon Widdis <[email protected]>
  • Loading branch information
Swiddis authored Sep 10, 2024
1 parent 3d043e5 commit 7bfffe7
Showing 1 changed file with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
EuiCheckboxGroup,
EuiComboBox,
EuiFormRow,
EuiText,
EuiIcon,
EuiCallOut,
} from '@elastic/eui';
import {
REPORT_SOURCE_RADIOS,
Expand Down Expand Up @@ -800,22 +799,26 @@ export function ReportSettings(props: ReportSettingProps) {
/>
</EuiFormRow>
<EuiSpacer />
{savedSearchRecordLimit > 10000 ? (
<>
<EuiCallOut
color="primary"
title={i18n.translate(
'opensearch.reports.reportSettingProps.form.savedSearchLargeRecordLimitWarning',
{ defaultMessage: 'Generating reports with a large number of records can cause memory issues' }
)}
iconType="iInCircle"
size="s"
/>
<EuiSpacer size="xs" />
</>
) : null}
<EuiFormRow
id="reportSourceSavedSearchRecordLimit"
label={i18n.translate(
'opensearch.reports.reportSettingProps.form.savedSearchRecordLimit',
{ defaultMessage: 'Record limit' }
)}
helpText={
savedSearchRecordLimit > 10000 ? (
<EuiText color="warning" size="xs">
<EuiIcon color="warning" type="alert" size="s" /> Generating
very large reports can cause memory issues.
</EuiText>
) : (
''
)
}
>
<EuiFieldNumber
value={savedSearchRecordLimit}
Expand Down

0 comments on commit 7bfffe7

Please sign in to comment.