Skip to content

Commit

Permalink
Update large record report warning (#429)
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 d4f95c9 commit 757d248
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ import {
EuiCompressedCheckboxGroup,
EuiCompressedComboBox,
EuiFormRow,
OuiCallOut,
EuiText,
EuiIcon,
EuiCallOut,
} from '@elastic/eui';
import {
REPORT_SOURCE_RADIOS,
Expand Down Expand Up @@ -801,22 +799,26 @@ export function ReportSettings(props: ReportSettingProps) {
/>
</EuiCompressedFormRow>
<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 757d248

Please sign in to comment.