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

[Discover] Rename Index pattern to Data view #110402

Merged
Show file tree
Hide file tree
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 @@ -52,8 +52,8 @@ export function Doc(props: DocProps) {
iconType="alert"
title={
<FormattedMessage
id="discover.doc.failedToLocateIndexPattern"
defaultMessage="No index pattern matches ID {indexPatternId}."
id="discover.doc.failedToLocateDataView"
defaultMessage="No data view matches ID {indexPatternId}."
values={{ indexPatternId: props.indexPatternId }}
/>
}
Expand Down Expand Up @@ -98,7 +98,7 @@ export function Doc(props: DocProps) {
<EuiLink href={indexExistsLink} target="_blank">
<FormattedMessage
id="discover.doc.somethingWentWrongDescriptionAddon"
defaultMessage="Please ensure the index exists."
defaultMessage="Please ensure the data view exists."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is referring to ES index and should not be renamed.

/>
</EuiLink>
</EuiCallOut>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export function ChangeIndexPattern({
>
<div style={{ width: 320 }}>
<EuiPopoverTitle>
{i18n.translate('discover.fieldChooser.indexPattern.changeIndexPatternTitle', {
defaultMessage: 'Change index pattern',
{i18n.translate('discover.fieldChooser.indexPattern.changeDataViewTitle', {
defaultMessage: 'Change data view',
})}
</EuiPopoverTitle>
<EuiSelectable<{ value: string }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function DiscoverFieldComponent({
iconType="pencil"
data-test-subj={`discoverFieldListPanelEdit-${field.name}`}
aria-label={i18n.translate('discover.fieldChooser.discoverField.editFieldLabel', {
defaultMessage: 'Edit index pattern field',
defaultMessage: 'Edit data view field',
})}
/>
</EuiFlexItem>
Expand All @@ -337,7 +337,7 @@ function DiscoverFieldComponent({
<EuiFlexItem grow={false} data-test-subj="discoverFieldListPanelDeleteItem">
<EuiToolTip
content={i18n.translate('discover.fieldChooser.discoverField.deleteFieldLabel', {
defaultMessage: 'Delete index pattern field',
defaultMessage: 'Delete data view field',
})}
>
<EuiButtonIcon
Expand All @@ -348,7 +348,7 @@ function DiscoverFieldComponent({
data-test-subj={`discoverFieldListPanelDelete-${field.name}`}
color="danger"
aria-label={i18n.translate('discover.fieldChooser.discoverField.deleteFieldLabel', {
defaultMessage: 'Delete index pattern field',
defaultMessage: 'Delete data view field',
})}
/>
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function DiscoverIndexPatternManagement(props: DiscoverIndexPatternManage
iconType="boxesHorizontal"
data-test-subj="discoverIndexPatternActions"
aria-label={i18n.translate('discover.fieldChooser.indexPatterns.actionsPopoverLabel', {
defaultMessage: 'Index pattern settings',
defaultMessage: 'Data view settings',
})}
onClick={() => {
setIsAddIndexPatternFieldPopoverOpen(!isAddIndexPatternFieldPopoverOpen);
Expand All @@ -84,7 +84,7 @@ export function DiscoverIndexPatternManagement(props: DiscoverIndexPatternManage
}}
>
{i18n.translate('discover.fieldChooser.indexPatterns.addFieldButton', {
defaultMessage: 'Add field to index pattern',
defaultMessage: 'Add field to data view',
})}
</EuiContextMenuItem>,
<EuiContextMenuItem
Expand All @@ -99,7 +99,7 @@ export function DiscoverIndexPatternManagement(props: DiscoverIndexPatternManage
}}
>
{i18n.translate('discover.fieldChooser.indexPatterns.manageFieldButton', {
defaultMessage: 'Manage index pattern fields',
defaultMessage: 'Manage data view fields',
})}
</EuiContextMenuItem>,
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export function resolveIndexPattern(
}

if (stateVal && !stateValFound) {
const warningTitle = i18n.translate('discover.valueIsNotConfiguredIndexPatternIDWarningTitle', {
defaultMessage: '{stateVal} is not a configured index pattern ID',
const warningTitle = i18n.translate('discover.valueIsNotConfiguredDataViewIDWarningTitle', {
Copy link
Contributor

@majagrubic majagrubic Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be changing the keys just yet. I would leave this for a code-cleanup phase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's fine as in other renaming PRs keys were updated too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Dziana here, let's keep it as it

defaultMessage: '{stateVal} is not a configured data view ID',
values: {
stateVal: `"${stateVal}"`,
},
Expand All @@ -117,9 +117,9 @@ export function resolveIndexPattern(
if (ownIndexPattern) {
toastNotifications.addWarning({
title: warningTitle,
text: i18n.translate('discover.showingSavedIndexPatternWarningDescription', {
text: i18n.translate('discover.showingSavedDataViewWarningDescription', {
defaultMessage:
'Showing the saved index pattern: "{ownIndexPatternTitle}" ({ownIndexPatternId})',
'Showing the saved data view: "{ownIndexPatternTitle}" ({ownIndexPatternId})',
values: {
ownIndexPatternTitle: ownIndexPattern.title,
ownIndexPatternId: ownIndexPattern.id,
Expand All @@ -131,9 +131,9 @@ export function resolveIndexPattern(

toastNotifications.addWarning({
title: warningTitle,
text: i18n.translate('discover.showingDefaultIndexPatternWarningDescription', {
text: i18n.translate('discover.showingDefaultDataViewWarningDescription', {
defaultMessage:
'Showing the default index pattern: "{loadedIndexPatternTitle}" ({loadedIndexPatternId})',
'Showing the default data view: "{loadedIndexPatternTitle}" ({loadedIndexPatternId})',
values: {
loadedIndexPatternTitle: loadedIndexPattern.title,
loadedIndexPatternId: loadedIndexPattern.id,
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/discover/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const getUiSettings: () => Record<string, UiSettingsParams> = () => ({
type: 'select',
description: i18n.translate('discover.advancedSettings.sortDefaultOrderText', {
defaultMessage:
'Controls the default sort direction for time based index patterns in the Discover app.',
'Controls the default sort direction for time based data views in the Discover app.',
}),
category: ['discover'],
schema: schema.oneOf([schema.literal('desc'), schema.literal('asc')]),
Expand Down Expand Up @@ -149,7 +149,7 @@ export const getUiSettings: () => Record<string, UiSettingsParams> = () => ({
description: i18n.translate('discover.advancedSettings.context.tieBreakerFieldsText', {
defaultMessage:
'A comma-separated list of fields to use for tie-breaking between documents that have the same timestamp value. ' +
'From this list the first field that is present and sortable in the current index pattern is used.',
'From this list the first field that is present and sortable in the current data view is used.',
}),
category: ['discover'],
schema: schema.arrayOf(schema.string()),
Expand All @@ -173,11 +173,11 @@ export const getUiSettings: () => Record<string, UiSettingsParams> = () => ({
},
[MODIFY_COLUMNS_ON_SWITCH]: {
name: i18n.translate('discover.advancedSettings.discover.modifyColumnsOnSwitchTitle', {
defaultMessage: 'Modify columns when changing index patterns',
defaultMessage: 'Modify columns when changing data views',
}),
value: true,
description: i18n.translate('discover.advancedSettings.discover.modifyColumnsOnSwitchText', {
defaultMessage: 'Remove columns that are not available in the new index pattern.',
defaultMessage: 'Remove columns that are not available in the new data view.',
}),
category: ['discover'],
schema: schema.boolean(),
Expand Down
15 changes: 0 additions & 15 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -2322,12 +2322,9 @@
"discover.advancedSettings.context.defaultSizeTitle": "コンテキストサイズ",
"discover.advancedSettings.context.sizeStepText": "コンテキストサイズを増減させる際の最低単位です",
"discover.advancedSettings.context.sizeStepTitle": "コンテキストサイズのステップ",
"discover.advancedSettings.context.tieBreakerFieldsText": "同じタイムスタンプ値のドキュメントを区別するためのコンマ区切りのフィールドのリストです。このリストから、現在のインデックスパターンに含まれ並べ替え可能な初めのフィールドが使用されます。",
"discover.advancedSettings.context.tieBreakerFieldsTitle": "タイブレーカーフィールド",
"discover.advancedSettings.defaultColumnsText": "デフォルトで Discover タブに表示される列です",
"discover.advancedSettings.defaultColumnsTitle": "デフォルトの列",
"discover.advancedSettings.discover.modifyColumnsOnSwitchText": "新しいインデックスパターンで使用できない列を削除します。",
"discover.advancedSettings.discover.modifyColumnsOnSwitchTitle": "インデックスパターンを変更するときに列を修正",
"discover.advancedSettings.discover.multiFieldsLinkText": "マルチフィールド",
"discover.advancedSettings.discover.readFieldsFromSource": "_sourceからフィールドを読み取る",
"discover.advancedSettings.discover.readFieldsFromSourceDescription": "有効にすると、「_source」から直接ドキュメントを読み込みます。これはまもなく廃止される予定です。無効にすると、上位レベルの検索サービスで新しいフィールドAPI経由でフィールドを取得します。",
Expand All @@ -2345,7 +2342,6 @@
"discover.advancedSettings.sampleSizeTitle": "行数",
"discover.advancedSettings.searchOnPageLoadText": "Discover の最初の読み込み時に検索を実行するかを制御します。この設定は、保存された検索の読み込み時には影響しません。",
"discover.advancedSettings.searchOnPageLoadTitle": "ページの読み込み時の検索",
"discover.advancedSettings.sortDefaultOrderText": "Discover アプリのインデックスパターンに基づく時刻のデフォルトの並べ替え方向をコントロールします。",
"discover.advancedSettings.sortDefaultOrderTitle": "デフォルトの並べ替え方向",
"discover.advancedSettings.sortOrderAsc": "昇順",
"discover.advancedSettings.sortOrderDesc": "降順",
Expand Down Expand Up @@ -2384,10 +2380,8 @@
"discover.doc.couldNotFindDocumentsDescription": "そのIDに一致するドキュメントがありません。",
"discover.doc.failedToExecuteQueryDescription": "検索の実行に失敗しました",
"discover.doc.failedToLocateDocumentDescription": "ドキュメントが見つかりませんでした",
"discover.doc.failedToLocateIndexPattern": "ID {indexPatternId}に一致するインデックスパターンがありません。",
"discover.doc.loadingDescription": "読み込み中…",
"discover.doc.somethingWentWrongDescription": "{indexName}が見つかりません。",
"discover.doc.somethingWentWrongDescriptionAddon": "インデックスが存在することを確認してください。",
"discover.docTable.documentsNavigation": "ドキュメントナビゲーション",
"discover.docTable.limitedSearchResultLabel": "{resultCount}件の結果のみが表示されます。検索結果を絞り込みます。",
"discover.docTable.noResultsTitle": "結果が見つかりませんでした",
Expand Down Expand Up @@ -2441,8 +2435,6 @@
"discover.fieldChooser.discoverField.actions": "アクション",
"discover.fieldChooser.discoverField.addButtonAriaLabel": "{field}を表に追加",
"discover.fieldChooser.discoverField.addFieldTooltip": "フィールドを列として追加",
"discover.fieldChooser.discoverField.deleteFieldLabel": "インデックスパターンフィールドを削除",
"discover.fieldChooser.discoverField.editFieldLabel": "インデックスパターンフィールドを編集",
"discover.fieldChooser.discoverField.fieldTopValuesLabel": "トップ5の値",
"discover.fieldChooser.discoverField.multiField": "複数フィールド",
"discover.fieldChooser.discoverField.multiFields": "マルチフィールド",
Expand All @@ -2468,10 +2460,6 @@
"discover.fieldChooser.filter.toggleButton.no": "いいえ",
"discover.fieldChooser.filter.toggleButton.yes": "はい",
"discover.fieldChooser.filter.typeLabel": "型",
"discover.fieldChooser.indexPattern.changeIndexPatternTitle": "インデックスパターンを変更",
"discover.fieldChooser.indexPatterns.actionsPopoverLabel": "インデックスパターン設定",
"discover.fieldChooser.indexPatterns.addFieldButton": "フィールドをインデックスパターンに追加",
"discover.fieldChooser.indexPatterns.manageFieldButton": "インデックスパターンを管理",
"discover.fieldChooser.searchPlaceHolder": "検索フィールド名",
"discover.fieldChooser.toggleFieldFilterButtonHideAriaLabel": "フィールド設定を非表示",
"discover.fieldChooser.toggleFieldFilterButtonShowAriaLabel": "フィールド設定を表示",
Expand Down Expand Up @@ -2565,8 +2553,6 @@
"discover.showAllDocuments": "すべてのドキュメントを表示",
"discover.showChart": "グラフを表示",
"discover.showErrorMessageAgain": "エラーメッセージを表示",
"discover.showingDefaultIndexPatternWarningDescription": "デフォルトのインデックスパターン「{loadedIndexPatternTitle}」({loadedIndexPatternId})を表示中",
"discover.showingSavedIndexPatternWarningDescription": "保存されたインデックスパターン「{ownIndexPatternTitle}」({ownIndexPatternId})を表示中",
"discover.showSelectedDocumentsOnly": "選択したドキュメントのみを表示",
"discover.skipToBottomButtonLabel": "テーブルの最後に移動",
"discover.sourceViewer.errorMessage": "現在データを取得できませんでした。タブを更新して、再試行してください。",
Expand All @@ -2583,7 +2569,6 @@
"discover.uninitializedRefreshButtonText": "データを更新",
"discover.uninitializedText": "クエリを作成、フィルターを追加、または[更新]をクリックして、現在のクエリの結果を取得します。",
"discover.uninitializedTitle": "検索開始",
"discover.valueIsNotConfiguredIndexPatternIDWarningTitle": "{stateVal}は設定されたインデックスパターンIDではありません",
"embeddableApi.addPanel.createNewDefaultOption": "新規作成",
"embeddableApi.addPanel.displayName": "パネルの追加",
"embeddableApi.addPanel.noMatchingObjectsMessage": "一致するオブジェクトが見つかりませんでした。",
Expand Down
Loading