Skip to content

Commit

Permalink
Make copy CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed Aug 11, 2020
1 parent ba15be0 commit bc879a5
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,19 @@ export const ComponentTemplatesSelector = ({
</div>
</>
) : (
<div>
<FormattedMessage
id="xpack.idxMgmt.componentTemplatesSelector.noComponentSelectedLabel"
defaultMessage="No component template selected."
/>
</div>
<EuiText textAlign="center">
<p>
<FormattedMessage
id="xpack.idxMgmt.componentTemplatesSelector.noComponentSelectedLabel-1"
defaultMessage="Add component template building blocks to this template."
/>
<br />
<FormattedMessage
id="xpack.idxMgmt.componentTemplatesSelector.noComponentSelectedLabel-2"
defaultMessage="Component templates are applied in the order specified."
/>
</p>
</EuiText>
)}
</EuiFlexItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export const SimulateTemplate = React.memo(({ template, filters }: Props) => {
// which we don't do here.
delete data.overlapping;

if (data.template.mappings === undefined) {
// Adding some extra logic to return an empty object for "mappings" as ES does not
// return one in that case (empty objects _are_ returned for "settings" and "aliases")
data.template.mappings = {};
}

if (filters) {
filteredTemplate = Object.entries(filters).reduce(
(acc, [key, value]) => {
Expand Down Expand Up @@ -76,8 +82,8 @@ export const SimulateTemplate = React.memo(({ template, filters }: Props) => {
<EuiCallOut
title={
<FormattedMessage
id="xpack.idxMgmt.simulateTemplate.emptyFilterdResult"
defaultMessage="Nothing to preview with the current filters."
id="xpack.idxMgmt.simulateTemplate.noFilterSelected"
defaultMessage="You need to include at least one of the above filters."
/>
}
iconType="pin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const SimulateTemplateFlyoutContent = ({
<p>
<FormattedMessage
id="xpack.idxMgmt.simulateTemplate.descriptionText"
defaultMessage="This is the final template that will be applied to your indices based on the
components templates you have selected and any overrides you've added."
defaultMessage="This is the final template that will be applied to matching indices based on the
component templates you have selected and any overrides you've added."
/>
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const i18nTexts = {
description: (
<FormattedMessage
id="xpack.idxMgmt.formWizard.stepComponents.componentsDescription"
defaultMessage="Components templates let you save index settings, mappings and aliases and inherit from them in index templates."
defaultMessage="Component templates let you save index settings, mappings and aliases and inherit from them in index templates."
/>
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const PreviewTab = ({ template }: { template: { [key: string]: any } }) => {
<p>
<FormattedMessage
id="xpack.idxMgmt.templateForm.stepReview.previewTab.descriptionText"
defaultMessage="This is the final template that will be applied to your indices."
defaultMessage="This is the final template that will be applied to matching indices. Component templates are applied in the order specified. Explicit mappings, settings, and aliases override the component templates."
/>
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const TabPreview = ({ templateDetails }: Props) => {
<p>
<FormattedMessage
id="xpack.idxMgmt.templateDetails.previewTab.descriptionText"
defaultMessage="This is the final template that will be applied to your indices."
defaultMessage="This is the final template that will be applied to matching indices."
/>
</p>
</EuiText>
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 @@ -7298,7 +7298,6 @@
"xpack.idxMgmt.componentTemplatesSelector.filters.mappingsLabel": "マッピング",
"xpack.idxMgmt.componentTemplatesSelector.loadingComponentsDescription": "コンポーネントテンプレートを読み込んでいます...",
"xpack.idxMgmt.componentTemplatesSelector.loadingComponentsErrorMessage": "コンポーネントの読み込みエラー",
"xpack.idxMgmt.componentTemplatesSelector.noComponentSelectedLabel": "コンポーネントテンプレートが選択されていません。",
"xpack.idxMgmt.componentTemplatesSelector.removeItemIconLabel": "削除",
"xpack.idxMgmt.componentTemplatesSelector.searchBox.placeholder": "コンポーネントテンプレートを検索",
"xpack.idxMgmt.componentTemplatesSelector.searchResult.emptyPrompt.clearSearchButtonLabel": "検索のクリア",
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 @@ -7299,7 +7299,6 @@
"xpack.idxMgmt.componentTemplatesSelector.filters.mappingsLabel": "映射",
"xpack.idxMgmt.componentTemplatesSelector.loadingComponentsDescription": "正在加载组件模板……",
"xpack.idxMgmt.componentTemplatesSelector.loadingComponentsErrorMessage": "加载组件时出错",
"xpack.idxMgmt.componentTemplatesSelector.noComponentSelectedLabel": "未选择任何组件模板。",
"xpack.idxMgmt.componentTemplatesSelector.removeItemIconLabel": "移除",
"xpack.idxMgmt.componentTemplatesSelector.searchBox.placeholder": "搜索组件模板",
"xpack.idxMgmt.componentTemplatesSelector.searchResult.emptyPrompt.clearSearchButtonLabel": "清除搜索",
Expand Down

0 comments on commit bc879a5

Please sign in to comment.