Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transform] Show destination index mapping warning for the latest transform #87858

Merged
merged 4 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -191,8 +191,8 @@ export const StepDefineSummary: FC<Props> = ({
}
)}
dataTestSubj="transformPivotPreview"
title={i18n.translate('xpack.transform.pivotPreview.PivotPreviewTitle', {
defaultMessage: 'Transform pivot preview',
title={i18n.translate('xpack.transform.pivotPreview.transformPreviewTitle', {
defaultMessage: 'Transform preview',
})}
toastNotifications={toastNotifications}
/>
Expand Down
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. Otherwise, the destination index is created with dynamic mappings. 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
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -21113,7 +21113,6 @@
"xpack.transform.pivotPreview.copyClipboardTooltip": "ピボットプレビューの開発コンソールステートメントをクリップボードにコピーします。",
"xpack.transform.pivotPreview.PivotPreviewIncompleteConfigCalloutBody": "group-by フィールドと集約を 1 つ以上選んでください。",
"xpack.transform.pivotPreview.PivotPreviewNoDataCalloutBody": "プレビューリクエストはデータを返しませんでした。オプションのクエリがデータを返し、グループ分け基準により使用されるフィールドと集約フィールドに値が存在することを確認してください。",
"xpack.transform.pivotPreview.PivotPreviewTitle": "ピボットプレビューを変換",
"xpack.transform.progress": "進捗",
"xpack.transform.statsBar.batchTransformsLabel": "一斉",
"xpack.transform.statsBar.continuousTransformsLabel": "連続",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -21162,7 +21162,6 @@
"xpack.transform.pivotPreview.copyClipboardTooltip": "将透视预览的开发控制台语句复制到剪贴板。",
"xpack.transform.pivotPreview.PivotPreviewIncompleteConfigCalloutBody": "请至少选择一个分组依据字段和聚合。",
"xpack.transform.pivotPreview.PivotPreviewNoDataCalloutBody": "预览请求未返回任何数据。请确保可选查询返回数据且存在分组依据和聚合字段使用的字段的值。",
"xpack.transform.pivotPreview.PivotPreviewTitle": "转换数据透视表预览",
"xpack.transform.progress": "进度",
"xpack.transform.statsBar.batchTransformsLabel": "批量",
"xpack.transform.statsBar.continuousTransformsLabel": "连续",
Expand Down