Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React, { Fragment, FC, useEffect, useState } from 'react';

import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';

import {
EuiAccordion,
Expand All @@ -17,6 +18,7 @@ import {
EuiFormRow,
EuiSelect,
EuiSpacer,
EuiCallOut,
} from '@elastic/eui';

import { KBN_FIELD_TYPES } from '../../../../../../../../../src/plugins/data/common';
Expand Down Expand Up @@ -50,6 +52,7 @@ import {
transformSettingsMaxPageSearchSizeValidator,
} from '../../../../common/validators';
import { StepDefineExposedState } from '../step_define/common';
import { TRANSFORM_FUNCTION } from '../../../../../../common/constants';

export interface StepDetailsExposedState {
continuousModeDateField: string;
Expand Down Expand Up @@ -397,6 +400,7 @@ export const StepDetailsForm: FC<Props> = React.memo(
data-test-subj="transformDescriptionInput"
/>
</EuiFormRow>

<EuiFormRow
label={i18n.translate('xpack.transform.stepDetailsForm.destinationIndexLabel', {
defaultMessage: 'Destination index',
Expand Down Expand Up @@ -443,6 +447,30 @@ export const StepDetailsForm: FC<Props> = React.memo(
/>
</EuiFormRow>

{stepDefineState.transformFunction === TRANSFORM_FUNCTION.LATEST ? (
<>
<EuiSpacer size={'m'} />
<EuiCallOut color="warning" iconType="alert" size="m">
<p>
<FormattedMessage
id="xpack.transform.stepDetailsForm.destinationIndexWarning"
defaultMessage="Before you start the transform, use index templates or the {docsLink} to ensure the mappings for your destination index match the source index. If the transform fails, check the messages tab on the Stack Management page for errors."
values={{
docsLink: (
<EuiLink href={esIndicesCreateIndex} target="_blank">
{i18n.translate('xpack.transform.stepDetailsForm.createIndexAPI', {
defaultMessage: 'Create index API',
})}
</EuiLink>
),
}}
/>
</p>
</EuiCallOut>
<EuiSpacer size={'m'} />
</>
) : null}

<EuiFormRow
isInvalid={createIndexPattern && indexPatternTitleExists}
error={
Expand Down