Skip to content

Commit

Permalink
[feature branch] index pattern => data view for user facing content (#…
Browse files Browse the repository at this point in the history
…109821)

* [index pattern management] index pattern => data view for user facing content (#109577)
  • Loading branch information
mattkime authored Oct 20, 2021
1 parent ee3c0c4 commit 64f1ddd
Show file tree
Hide file tree
Showing 249 changed files with 879 additions and 1,305 deletions.
4 changes: 2 additions & 2 deletions src/plugins/data/common/search/aggs/param_types/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class FieldParamType extends BaseParamType {
'data.search.aggs.paramTypes.field.notFoundSavedFieldParameterErrorMessage',
{
defaultMessage:
'The field "{fieldParameter}" associated with this object no longer exists in the index pattern. Please use another field.',
'The field "{fieldParameter}" associated with this object no longer exists in the data view. Please use another field.',
values: {
fieldParameter: field.name,
},
Expand All @@ -75,7 +75,7 @@ export class FieldParamType extends BaseParamType {
'data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage',
{
defaultMessage:
'Saved field "{fieldParameter}" of index pattern "{indexPatternTitle}" is invalid for use with the "{aggType}" aggregation. Please select a new field.',
'Saved field "{fieldParameter}" of data view "{indexPatternTitle}" is invalid for use with the "{aggType}" aggregation. Please select a new field.',
values: {
fieldParameter: field.name,
aggType: aggConfig?.type?.title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const getEsaggsMeta: () => Omit<EsaggsExpressionFunctionDefinition, 'fn'>
types: ['index_pattern'],
required: true,
help: i18n.translate('data.search.functions.esaggs.index.help', {
defaultMessage: 'Index pattern retrieved with indexPatternLoad',
defaultMessage: 'Data view retrieved with indexPatternLoad',
}),
},
aggs: {
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/data/common/search/expressions/esdsl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ export const getEsdslFn = ({

request.stats({
indexPattern: {
label: i18n.translate('data.search.es_search.indexPatternLabel', {
defaultMessage: 'Index pattern',
label: i18n.translate('data.search.es_search.dataViewLabel', {
defaultMessage: 'Data view',
}),
value: args.index,
description: i18n.translate('data.search.es_search.indexPatternDescription', {
defaultMessage: 'The index pattern that connected to the Elasticsearch indices.',
defaultMessage: 'The data view that connected to the Elasticsearch indices.',
}),
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export function getRequestInspectorStats(searchSource: ISearchSource) {

if (index) {
stats.indexPattern = {
label: i18n.translate('data.search.searchSource.indexPatternLabel', {
defaultMessage: 'Index pattern',
label: i18n.translate('data.search.searchSource.dataViewLabel', {
defaultMessage: 'Data view',
}),
value: index.title,
description: i18n.translate('data.search.searchSource.indexPatternDescription', {
defaultMessage: 'The index pattern that connected to the Elasticsearch indices.',
description: i18n.translate('data.search.searchSource.dataViewDescription', {
defaultMessage: 'The data view that was queried.',
}),
};
stats.indexPatternId = {
label: i18n.translate('data.search.searchSource.indexPatternIdLabel', {
defaultMessage: 'Index pattern ID',
label: i18n.translate('data.search.searchSource.dataViewIdLabel', {
defaultMessage: 'Data view ID',
}),
value: index.id!,
description: i18n.translate('data.search.searchSource.indexPatternIdDescription', {
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/data_views/common/data_views/data_views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export class DataViewsService {

this.onError(err, {
title: i18n.translate('dataViews.fetchFieldErrorTitle', {
defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})',
defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
values: { id: indexPattern.id, title: indexPattern.title },
}),
});
Expand Down Expand Up @@ -341,7 +341,7 @@ export class DataViewsService {

this.onError(err, {
title: i18n.translate('dataViews.fetchFieldErrorTitle', {
defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})',
defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
values: { id, title },
}),
});
Expand Down Expand Up @@ -483,7 +483,7 @@ export class DataViewsService {
} else {
this.onError(err, {
title: i18n.translate('dataViews.fetchFieldErrorTitle', {
defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})',
defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
values: { id: savedObject.id, title },
}),
});
Expand Down Expand Up @@ -654,7 +654,7 @@ export class DataViewsService {
}
const title = i18n.translate('dataViews.unableWriteLabel', {
defaultMessage:
'Unable to write index pattern! Refresh the page to get the most up to date changes for this index pattern.',
'Unable to write data view! Refresh the page to get the most up to date changes for this data view.',
});

this.onNotification({ title, color: 'danger' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ export const getIndexPatternLoadMeta = (): Omit<
name,
type,
inputTypes: ['null'],
help: i18n.translate('dataViews.indexPatternLoad.help', {
defaultMessage: 'Loads an index pattern',
help: i18n.translate('dataViews.functions.dataViewLoad.help', {
defaultMessage: 'Loads a data view',
}),
args: {
id: {
types: ['string'],
required: true,
help: i18n.translate('dataViews.functions.indexPatternLoad.id.help', {
defaultMessage: 'index pattern id to load',
help: i18n.translate('dataViews.functions.dataViewLoad.id.help', {
defaultMessage: 'data view id to load',
}),
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data_views/common/lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { KbnError } from '../../../kibana_utils/common';
*/
export class DataViewMissingIndices extends KbnError {
constructor(message: string) {
const defaultMessage = "IndexPattern's configured pattern does not match any indices";
const defaultMessage = "Data view's title does not match any indices";

super(
message && message.length ? `No matching indices found: ${message}` : defaultMessage
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/data_views/server/deprecations/scripted_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export const createScriptedFieldsDeprecationsConfig: (
return [
{
title: i18n.translate('dataViews.deprecations.scriptedFieldsTitle', {
defaultMessage: 'Found index patterns using scripted fields',
defaultMessage: 'Found data views using scripted fields',
}),
message: i18n.translate('dataViews.deprecations.scriptedFieldsMessage', {
defaultMessage: `You have {numberOfIndexPatternsWithScriptedFields} index patterns ({titlesPreview}...) that use scripted fields. Scripted fields are deprecated and will be removed in future. Use runtime fields instead.`,
defaultMessage: `You have {numberOfIndexPatternsWithScriptedFields} data views ({titlesPreview}...) that use scripted fields. Scripted fields are deprecated and will be removed in future. Use runtime fields instead.`,
values: {
titlesPreview: indexPatternTitles.slice(0, PREVIEW_LIMIT).join('; '),
numberOfIndexPatternsWithScriptedFields: indexPatternsWithScriptedFields.length,
Expand All @@ -57,11 +57,11 @@ export const createScriptedFieldsDeprecationsConfig: (
correctiveActions: {
manualSteps: [
i18n.translate('dataViews.deprecations.scriptedFields.manualStepOneMessage', {
defaultMessage: 'Navigate to Stack Management > Kibana > Index Patterns.',
defaultMessage: 'Navigate to Stack Management > Kibana > Data Views.',
}),
i18n.translate('dataViews.deprecations.scriptedFields.manualStepTwoMessage', {
defaultMessage:
'Update {numberOfIndexPatternsWithScriptedFields} index patterns that have scripted fields to use runtime fields instead. In most cases, to migrate existing scripts, you will need to change "return <value>;" to "emit(<value>);". Index patterns with at least one scripted field: {allTitles}',
'Update {numberOfIndexPatternsWithScriptedFields} data views that have scripted fields to use runtime fields instead. In most cases, to migrate existing scripts, you will need to change "return <value>;" to "emit(<value>);". Data views with at least one scripted field: {allTitles}',
values: {
allTitles: indexPatternTitles.join('; '),
numberOfIndexPatternsWithScriptedFields: indexPatternsWithScriptedFields.length,
Expand Down
1 change: 1 addition & 0 deletions src/plugins/data_views/server/saved_objects/data_views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const dataViewSavedObjectType: SavedObjectsType = {
hidden: false,
namespaceType: 'single',
management: {
displayName: 'Data view',
icon: 'indexPatternApp',
defaultSearchField: 'title',
importableAndExportable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,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: indexPattern.id }}
/>
}
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', {
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 @@ -80,7 +80,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 @@ -150,7 +150,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 @@ -174,11 +174,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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const allowHiddenAriaLabel = i18n.translate('indexPatternEditor.form.allowHidden
const customIndexPatternIdLabel = i18n.translate(
'indexPatternEditor.form.customIndexPatternIdLabel',
{
defaultMessage: 'Custom index pattern ID',
defaultMessage: 'Custom data view ID',
}
);

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 @@ -52,8 +52,8 @@ export const EmptyIndexListPrompt = ({
link: (
<EuiLink onClick={() => createAnyway()} data-test-subj="createAnyway">
<FormattedMessage
id="indexPatternEditor.createIndexPattern.emptyState.createAnywayLink"
defaultMessage="create an index pattern against hidden or system indices."
id="indexPatternEditor.createDataView.emptyState.createAnywayLink"
defaultMessage="create a data view against hidden or system indices."
/>
</EuiLink>
),
Expand Down
Loading

0 comments on commit 64f1ddd

Please sign in to comment.