Skip to content

Commit

Permalink
Update large record report warning (opensearch-project#429)
Browse files Browse the repository at this point in the history
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
  • Loading branch information
Swiddis committed Sep 10, 2024
1 parent 3d043e5 commit d8badba
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 d8badba

Please sign in to comment.