mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[feature branch] index pattern => data view for user facing content (#109821)
* [index pattern management] index pattern => data view for user facing content (#109577)
This commit is contained in:
parent
ee3c0c447e
commit
64f1dddcb0
249 changed files with 881 additions and 1307 deletions
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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.',
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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', {
|
||||
|
|
|
@ -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 },
|
||||
}),
|
||||
});
|
||||
|
@ -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 },
|
||||
}),
|
||||
});
|
||||
|
@ -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 },
|
||||
}),
|
||||
});
|
||||
|
@ -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' });
|
||||
|
|
|
@ -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',
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
@ -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,
|
||||
|
|
|
@ -15,6 +15,7 @@ export const dataViewSavedObjectType: SavedObjectsType = {
|
|||
hidden: false,
|
||||
namespaceType: 'single',
|
||||
management: {
|
||||
displayName: 'Data view',
|
||||
icon: 'indexPatternApp',
|
||||
defaultSearchField: 'title',
|
||||
importableAndExportable: true,
|
||||
|
|
|
@ -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 }}
|
||||
/>
|
||||
}
|
||||
|
|
|
@ -671,7 +671,7 @@ exports[`Discover IndexPattern Management renders correctly 1`] = `
|
|||
anchorPosition="downCenter"
|
||||
button={
|
||||
<EuiButtonIcon
|
||||
aria-label="Index pattern settings"
|
||||
aria-label="Data view settings"
|
||||
color="text"
|
||||
data-test-subj="discoverIndexPatternActions"
|
||||
iconType="boxesHorizontal"
|
||||
|
@ -694,14 +694,14 @@ exports[`Discover IndexPattern Management renders correctly 1`] = `
|
|||
className="euiPopover__anchor"
|
||||
>
|
||||
<EuiButtonIcon
|
||||
aria-label="Index pattern settings"
|
||||
aria-label="Data view settings"
|
||||
color="text"
|
||||
data-test-subj="discoverIndexPatternActions"
|
||||
iconType="boxesHorizontal"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<button
|
||||
aria-label="Index pattern settings"
|
||||
aria-label="Data view settings"
|
||||
className="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall"
|
||||
data-test-subj="discoverIndexPatternActions"
|
||||
disabled={false}
|
||||
|
|
|
@ -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 }>
|
||||
|
|
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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>,
|
||||
]}
|
||||
|
|
|
@ -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}"`,
|
||||
},
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
|
|
@ -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')]),
|
||||
|
@ -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()),
|
||||
|
@ -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(),
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -202,8 +202,8 @@ exports[`EmptyIndexListPrompt should render normally 1`] = `
|
|||
onClick={[Function]}
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="create an index pattern against hidden or system indices."
|
||||
id="indexPatternEditor.createIndexPattern.emptyState.createAnywayLink"
|
||||
defaultMessage="create a data view against hidden or system indices."
|
||||
id="indexPatternEditor.createDataView.emptyState.createAnywayLink"
|
||||
values={Object {}}
|
||||
/>
|
||||
</EuiLink>,
|
||||
|
|
|
@ -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>
|
||||
),
|
||||
|
|
|
@ -44,15 +44,15 @@ exports[`EmptyIndexPatternPrompt should render normally 1`] = `
|
|||
/>
|
||||
<br />
|
||||
<FormattedMessage
|
||||
defaultMessage="Now, create an index pattern."
|
||||
id="indexPatternEditor.emptyIndexPatternPrompt.nowCreate"
|
||||
defaultMessage="Now, create a data view."
|
||||
id="indexPatternEditor.emptyDataViewPrompt.nowCreate"
|
||||
values={Object {}}
|
||||
/>
|
||||
</h2>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
defaultMessage="Kibana requires an index pattern to identify which data streams, indices, and index aliases you want to explore. An index pattern can point to a specific index, for example, your log data from yesterday, or all indices that contain your log data."
|
||||
id="indexPatternEditor.emptyIndexPatternPrompt.indexPatternExplanation"
|
||||
defaultMessage="Kibana requires a data view to identify which data streams, indices, and index aliases you want to explore. A data view can point to a specific index, for example, your log data from yesterday, or all indices that contain your log data."
|
||||
id="indexPatternEditor.emptyDataViewPrompt.indexPatternExplanation"
|
||||
values={Object {}}
|
||||
/>
|
||||
</p>
|
||||
|
@ -63,8 +63,8 @@ exports[`EmptyIndexPatternPrompt should render normally 1`] = `
|
|||
onClick={[Function]}
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="Create index pattern"
|
||||
id="indexPatternEditor.indexPatternTable.createBtn"
|
||||
defaultMessage="Create data view"
|
||||
id="indexPatternEditor.dataViewTable.createBtn"
|
||||
values={Object {}}
|
||||
/>
|
||||
</EuiButton>
|
||||
|
|
|
@ -52,15 +52,15 @@ export const EmptyIndexPatternPrompt = ({
|
|||
/>
|
||||
<br />
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.emptyIndexPatternPrompt.nowCreate"
|
||||
defaultMessage="Now, create an index pattern."
|
||||
id="indexPatternEditor.emptyDataViewPrompt.nowCreate"
|
||||
defaultMessage="Now, create a data view."
|
||||
/>
|
||||
</h2>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.emptyIndexPatternPrompt.indexPatternExplanation"
|
||||
defaultMessage="Kibana requires an index pattern to identify which data streams, indices, and index aliases you want to explore. An
|
||||
index pattern can point to a specific index, for example, your log data from
|
||||
id="indexPatternEditor.emptyDataViewPrompt.indexPatternExplanation"
|
||||
defaultMessage="Kibana requires a data view to identify which data streams, indices, and index aliases you want to explore. A
|
||||
data view can point to a specific index, for example, your log data from
|
||||
yesterday, or all indices that contain your log data."
|
||||
/>
|
||||
</p>
|
||||
|
@ -72,8 +72,8 @@ export const EmptyIndexPatternPrompt = ({
|
|||
data-test-subj="createIndexPatternButtonFlyout"
|
||||
>
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.indexPatternTable.createBtn"
|
||||
defaultMessage="Create index pattern"
|
||||
id="indexPatternEditor.dataViewTable.createBtn"
|
||||
defaultMessage="Create data view"
|
||||
/>
|
||||
</EuiButton>
|
||||
)}
|
||||
|
|
|
@ -28,7 +28,7 @@ const closeButtonLabel = i18n.translate('indexPatternEditor.editor.flyoutCloseBu
|
|||
});
|
||||
|
||||
const saveButtonLabel = i18n.translate('indexPatternEditor.editor.flyoutSaveButtonLabel', {
|
||||
defaultMessage: 'Create index pattern',
|
||||
defaultMessage: 'Create data view',
|
||||
});
|
||||
|
||||
export const Footer = ({ onCancel, onSubmit, submitDisabled }: FooterProps) => {
|
||||
|
|
|
@ -38,14 +38,14 @@ interface TitleFieldProps {
|
|||
}
|
||||
|
||||
const rollupIndexPatternNoMatchError = {
|
||||
message: i18n.translate('indexPatternEditor.rollupIndexPattern.createIndex.noMatchError', {
|
||||
defaultMessage: 'Rollup index pattern error: must match one rollup index',
|
||||
message: i18n.translate('indexPatternEditor.rollupDataView.createIndex.noMatchError', {
|
||||
defaultMessage: 'Rollup data view error: must match one rollup index',
|
||||
}),
|
||||
};
|
||||
|
||||
const rollupIndexPatternTooManyMatchesError = {
|
||||
message: i18n.translate('indexPatternEditor.rollupIndexPattern.createIndex.tooManyMatchesError', {
|
||||
defaultMessage: 'Rollup index pattern error: can only match one rollup index',
|
||||
message: i18n.translate('indexPatternEditor.rollupDataView.createIndex.tooManyMatchesError', {
|
||||
defaultMessage: 'Rollup data view error: can only match one rollup index',
|
||||
}),
|
||||
};
|
||||
|
||||
|
@ -61,8 +61,8 @@ const createTitlesNoDupesValidator = (
|
|||
validator: ({ value }) => {
|
||||
if (namesNotAllowed.includes(value)) {
|
||||
return {
|
||||
message: i18n.translate('indexPatternEditor.indexPatternExists.ValidationErrorMessage', {
|
||||
defaultMessage: 'An index pattern with this title already exists.',
|
||||
message: i18n.translate('indexPatternEditor.dataViewExists.ValidationErrorMessage', {
|
||||
defaultMessage: 'A data view with this title already exists.',
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ const createMatchesIndicesValidator = ({
|
|||
if (error) {
|
||||
return {
|
||||
message: i18n.translate('indexPatternEditor.rollup.uncaughtError', {
|
||||
defaultMessage: 'Rollup index pattern error: {error}',
|
||||
defaultMessage: 'Rollup data view error: {error}',
|
||||
values: {
|
||||
error,
|
||||
},
|
||||
|
|
|
@ -34,7 +34,7 @@ const standardSelectItem = (
|
|||
<EuiDescriptionListTitle>
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.typeSelect.standardTitle"
|
||||
defaultMessage="Standard index pattern"
|
||||
defaultMessage="Standard data view"
|
||||
/>
|
||||
</EuiDescriptionListTitle>
|
||||
<EuiDescriptionListDescription>
|
||||
|
@ -51,7 +51,7 @@ const rollupSelectItem = (
|
|||
<EuiDescriptionListTitle>
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.typeSelect.rollupTitle"
|
||||
defaultMessage="Rollup index pattern"
|
||||
defaultMessage="Rollup data view"
|
||||
/>
|
||||
|
||||
<EuiBadge color={euiColorAccent}>
|
||||
|
|
|
@ -47,16 +47,16 @@ export const schema = {
|
|||
},
|
||||
id: {
|
||||
label: i18n.translate('indexPatternEditor.editor.form.customIdLabel', {
|
||||
defaultMessage: 'Custom index pattern ID',
|
||||
defaultMessage: 'Custom data view ID',
|
||||
}),
|
||||
helpText: i18n.translate('indexPatternEditor.editor.form.customIdHelp', {
|
||||
defaultMessage:
|
||||
'Kibana provides a unique identifier for each index pattern, or you can create your own.',
|
||||
'Kibana provides a unique identifier for each data view, or you can create your own.',
|
||||
}),
|
||||
},
|
||||
type: {
|
||||
label: i18n.translate('indexPatternEditor.editor.form.TypeLabel', {
|
||||
defaultMessage: 'Index pattern type',
|
||||
defaultMessage: 'Data view type',
|
||||
}),
|
||||
defaultValue: INDEX_PATTERN_TYPE.DEFAULT,
|
||||
},
|
||||
|
|
|
@ -60,7 +60,7 @@ export interface Props {
|
|||
}
|
||||
|
||||
const editorTitle = i18n.translate('indexPatternEditor.title', {
|
||||
defaultMessage: 'Create index pattern',
|
||||
defaultMessage: 'Create data view',
|
||||
});
|
||||
|
||||
const IndexPatternEditorFlyoutContentComponent = ({
|
||||
|
|
|
@ -34,8 +34,8 @@ const IndexPatternFlyoutContentContainer = ({
|
|||
notifications.toasts.addSuccess(message);
|
||||
await onSave(indexPattern);
|
||||
} catch (e) {
|
||||
const title = i18n.translate('indexPatternEditor.indexPatterns.unableSaveLabel', {
|
||||
defaultMessage: 'Failed to save index pattern.',
|
||||
const title = i18n.translate('indexPatternEditor.dataView.unableSaveLabel', {
|
||||
defaultMessage: 'Failed to save data view.',
|
||||
});
|
||||
|
||||
notifications.toasts.addDanger({ title });
|
||||
|
|
|
@ -23,17 +23,17 @@ export const RollupBetaWarning = () => (
|
|||
<EuiCallOut title={rollupBetaWarningTitle} color="warning" iconType="help">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.rollupIndexPattern.warning.textParagraphOne"
|
||||
defaultMessage="Kibana's support for rollup index patterns is in beta. You might encounter
|
||||
issues using these patterns in saved searches, visualizations, and dashboards. They
|
||||
id="indexPatternEditor.rollupDataView.warning.textParagraphOne"
|
||||
defaultMessage="Kibana has beta support for data views based on rollups. You might encounter
|
||||
issues using these in saved searches, visualizations, and dashboards. They
|
||||
are not supported in some advanced features, such as Timelion, and Machine Learning."
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="indexPatternEditor.rollupIndexPattern.warning.textParagraphTwo"
|
||||
defaultMessage="You can match a rollup index pattern against one rollup index and zero or more
|
||||
regular indices. A rollup index pattern has limited metrics, fields, intervals, and
|
||||
id="indexPatternEditor.rollupDataView.warning.textParagraphTwo"
|
||||
defaultMessage="You can match a rollup data view against one rollup index and zero or more
|
||||
regular indices. A rollup data view has limited metrics, fields, intervals, and
|
||||
aggregations. A rollup index is limited to indices that have one job configuration,
|
||||
or multiple jobs with compatible configurations."
|
||||
/>
|
||||
|
|
|
@ -240,7 +240,7 @@ const FieldEditorFlyoutContentComponent = ({
|
|||
<p>
|
||||
<FormattedMessage
|
||||
id="indexPatternFieldEditor.editor.flyoutEditFieldSubtitle"
|
||||
defaultMessage="Index pattern: {patternName}"
|
||||
defaultMessage="Data view: {patternName}"
|
||||
values={{
|
||||
patternName: <i>{indexPattern.title}</i>,
|
||||
}}
|
||||
|
|
|
@ -159,7 +159,7 @@ export const PreviewFieldList: React.FC<Props> = ({ height, clearSearch, searchV
|
|||
{i18n.translate(
|
||||
'indexPatternFieldEditor.fieldPreview.searchResult.emptyPromptTitle',
|
||||
{
|
||||
defaultMessage: 'No matching fields in this index pattern',
|
||||
defaultMessage: 'No matching fields in this data view',
|
||||
}
|
||||
)}
|
||||
</h3>
|
||||
|
|
|
@ -12,8 +12,8 @@ import { IndexPattern } from '../../../data/public';
|
|||
export function getListBreadcrumbs() {
|
||||
return [
|
||||
{
|
||||
text: i18n.translate('indexPatternManagement.indexPatterns.listBreadcrumb', {
|
||||
defaultMessage: 'Index patterns',
|
||||
text: i18n.translate('indexPatternManagement.dataViews.listBreadcrumb', {
|
||||
defaultMessage: 'Data views',
|
||||
}),
|
||||
href: `/`,
|
||||
},
|
||||
|
@ -24,8 +24,8 @@ export function getCreateBreadcrumbs() {
|
|||
return [
|
||||
...getListBreadcrumbs(),
|
||||
{
|
||||
text: i18n.translate('indexPatternManagement.indexPatterns.createBreadcrumb', {
|
||||
defaultMessage: 'Create index pattern',
|
||||
text: i18n.translate('indexPatternManagement.dataViews.createBreadcrumb', {
|
||||
defaultMessage: 'Create data view',
|
||||
}),
|
||||
href: `/create`,
|
||||
},
|
||||
|
|
|
@ -48,14 +48,11 @@ export const CreateEditField = withRouter(
|
|||
const url = `/patterns/${indexPattern.id}`;
|
||||
|
||||
if (mode === 'edit' && !spec) {
|
||||
const message = i18n.translate(
|
||||
'indexPatternManagement.editIndexPattern.scripted.noFieldLabel',
|
||||
{
|
||||
defaultMessage:
|
||||
"'{indexPatternTitle}' index pattern doesn't have a scripted field called '{fieldName}'",
|
||||
values: { indexPatternTitle: indexPattern.title, fieldName },
|
||||
}
|
||||
);
|
||||
const message = i18n.translate('indexPatternManagement.editDataView.scripted.noFieldLabel', {
|
||||
defaultMessage:
|
||||
"'{dataViewTitle}' data view doesn't have a scripted field called '{fieldName}'",
|
||||
values: { dataViewTitle: indexPattern.title, fieldName },
|
||||
});
|
||||
notifications.toasts.addWarning(message);
|
||||
history.push(url);
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ const confirmModalOptionsDelete = {
|
|||
confirmButtonText: i18n.translate('indexPatternManagement.editIndexPattern.deleteButton', {
|
||||
defaultMessage: 'Delete',
|
||||
}),
|
||||
title: i18n.translate('indexPatternManagement.editIndexPattern.deleteHeader', {
|
||||
defaultMessage: 'Delete index pattern?',
|
||||
title: i18n.translate('indexPatternManagement.editDataView.deleteHeader', {
|
||||
defaultMessage: 'Delete data view?',
|
||||
}),
|
||||
};
|
||||
|
||||
|
@ -125,8 +125,8 @@ export const EditIndexPattern = withRouter(
|
|||
}
|
||||
);
|
||||
|
||||
const headingAriaLabel = i18n.translate('indexPatternManagement.editIndexPattern.detailsAria', {
|
||||
defaultMessage: 'Index pattern details',
|
||||
const headingAriaLabel = i18n.translate('indexPatternManagement.editDataView.detailsAria', {
|
||||
defaultMessage: 'Data view details',
|
||||
});
|
||||
|
||||
chrome.docTitle.change(indexPattern.title);
|
||||
|
|
|
@ -18,26 +18,20 @@ interface IndexHeaderProps {
|
|||
deleteIndexPatternClick?: () => void;
|
||||
}
|
||||
|
||||
const setDefaultAriaLabel = i18n.translate(
|
||||
'indexPatternManagement.editIndexPattern.setDefaultAria',
|
||||
{
|
||||
defaultMessage: 'Set as default index.',
|
||||
}
|
||||
);
|
||||
|
||||
const setDefaultTooltip = i18n.translate(
|
||||
'indexPatternManagement.editIndexPattern.setDefaultTooltip',
|
||||
{
|
||||
defaultMessage: 'Set as default index.',
|
||||
}
|
||||
);
|
||||
|
||||
const removeAriaLabel = i18n.translate('indexPatternManagement.editIndexPattern.removeAria', {
|
||||
defaultMessage: 'Delete index pattern.',
|
||||
const setDefaultAriaLabel = i18n.translate('indexPatternManagement.editDataView.setDefaultAria', {
|
||||
defaultMessage: 'Set as default data view.',
|
||||
});
|
||||
|
||||
const removeTooltip = i18n.translate('indexPatternManagement.editIndexPattern.removeTooltip', {
|
||||
defaultMessage: 'Delete index pattern.',
|
||||
const setDefaultTooltip = i18n.translate('indexPatternManagement.editDataView.setDefaultTooltip', {
|
||||
defaultMessage: 'Set as default data view.',
|
||||
});
|
||||
|
||||
const removeAriaLabel = i18n.translate('indexPatternManagement.editDataView.removeAria', {
|
||||
defaultMessage: 'Delete data view.',
|
||||
});
|
||||
|
||||
const removeTooltip = i18n.translate('indexPatternManagement.editDataView.removeTooltip', {
|
||||
defaultMessage: 'Delete data view.',
|
||||
});
|
||||
|
||||
export const IndexHeader: React.FC<IndexHeaderProps> = ({
|
||||
|
|
|
@ -14,7 +14,7 @@ exports[`Table render name 2`] = `
|
|||
<EuiIconTip
|
||||
content={
|
||||
<span>
|
||||
This field exists on the index pattern only.
|
||||
This field exists on the data view only.
|
||||
</span>
|
||||
}
|
||||
title="Runtime field"
|
||||
|
|
|
@ -163,8 +163,8 @@ const runtimeIconTipTitle = i18n.translate(
|
|||
);
|
||||
|
||||
const runtimeIconTipText = i18n.translate(
|
||||
'indexPatternManagement.editIndexPattern.fields.table.runtimeIconTipText',
|
||||
{ defaultMessage: 'This field exists on the index pattern only.' }
|
||||
'indexPatternManagement.editDataView.fields.table.runtimeIconTipText',
|
||||
{ defaultMessage: 'This field exists on the data view only.' }
|
||||
);
|
||||
|
||||
interface IndexedFieldProps {
|
||||
|
|
|
@ -46,8 +46,8 @@ const search = {
|
|||
},
|
||||
};
|
||||
|
||||
const title = i18n.translate('indexPatternManagement.indexPatternTable.title', {
|
||||
defaultMessage: 'Index patterns',
|
||||
const title = i18n.translate('indexPatternManagement.dataViewTable.title', {
|
||||
defaultMessage: 'Data views',
|
||||
});
|
||||
|
||||
interface Props extends RouteComponentProps {
|
||||
|
@ -97,7 +97,9 @@ export const IndexPatternTable = ({
|
|||
const columns = [
|
||||
{
|
||||
field: 'title',
|
||||
name: 'Pattern',
|
||||
name: i18n.translate('indexPatternManagement.dataViewTable.nameColumn', {
|
||||
defaultMessage: 'Name',
|
||||
}),
|
||||
render: (
|
||||
name: string,
|
||||
index: {
|
||||
|
@ -134,8 +136,8 @@ export const IndexPatternTable = ({
|
|||
data-test-subj="createIndexPatternButton"
|
||||
>
|
||||
<FormattedMessage
|
||||
id="indexPatternManagement.indexPatternTable.createBtn"
|
||||
defaultMessage="Create index pattern"
|
||||
id="indexPatternManagement.dataViewTable.createBtn"
|
||||
defaultMessage="Create data view"
|
||||
/>
|
||||
</EuiButton>
|
||||
) : (
|
||||
|
@ -164,8 +166,8 @@ export const IndexPatternTable = ({
|
|||
pageTitle={title}
|
||||
description={
|
||||
<FormattedMessage
|
||||
id="indexPatternManagement.indexPatternTable.indexPatternExplanation"
|
||||
defaultMessage="Create and manage the index patterns that help you retrieve your data from Elasticsearch."
|
||||
id="indexPatternManagement.dataViewTable.indexPatternExplanation"
|
||||
defaultMessage="Create and manage the data views that help you retrieve your data from Elasticsearch."
|
||||
/>
|
||||
}
|
||||
bottomBorder
|
||||
|
|
|
@ -28,8 +28,8 @@ const readOnlyBadge = {
|
|||
text: i18n.translate('indexPatternManagement.indexPatterns.badge.readOnly.text', {
|
||||
defaultMessage: 'Read only',
|
||||
}),
|
||||
tooltip: i18n.translate('indexPatternManagement.indexPatterns.badge.readOnly.tooltip', {
|
||||
defaultMessage: 'Unable to save index patterns',
|
||||
tooltip: i18n.translate('indexPatternManagement.dataViews.badge.readOnly.tooltip', {
|
||||
defaultMessage: 'Unable to save data views',
|
||||
}),
|
||||
iconType: 'glasses',
|
||||
};
|
||||
|
|
|
@ -32,8 +32,8 @@ export interface IndexPatternManagementSetup {}
|
|||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface IndexPatternManagementStart {}
|
||||
|
||||
const sectionsHeader = i18n.translate('indexPatternManagement.indexPattern.sectionsHeader', {
|
||||
defaultMessage: 'Index Patterns',
|
||||
const sectionsHeader = i18n.translate('indexPatternManagement.dataView.sectionsHeader', {
|
||||
defaultMessage: 'Data Views',
|
||||
});
|
||||
|
||||
const IPM_APP_ID = 'indexPatterns';
|
||||
|
|
|
@ -33,22 +33,28 @@ export interface IndexPatternSelectProps {
|
|||
| null;
|
||||
}
|
||||
|
||||
const defaultIndexPatternHelpText = i18n.translate(
|
||||
'visTypeTimeseries.indexPatternSelect.defaultIndexPatternText',
|
||||
{
|
||||
defaultMessage: 'Default index pattern is used.',
|
||||
}
|
||||
const queryAllIndicesHelpText = (
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.indexPatternSelect.queryAllIndicesText"
|
||||
defaultMessage="To query all indices, use {asterisk}."
|
||||
values={{
|
||||
asterisk: <strong>*</strong>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
const queryAllIndexesHelpText = i18n.translate(
|
||||
'visTypeTimeseries.indexPatternSelect.queryAllIndexesText',
|
||||
{
|
||||
defaultMessage: 'To query all indexes use *',
|
||||
}
|
||||
const getIndexPatternHelpText = (useKibanaIndices: boolean) => (
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.indexPatternSelect.defaultDataViewText"
|
||||
defaultMessage="Using the default data view. {queryAllIndicesHelpText}"
|
||||
values={{
|
||||
queryAllIndicesHelpText: useKibanaIndices ? '' : queryAllIndicesHelpText,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
const indexPatternLabel = i18n.translate('visTypeTimeseries.indexPatternSelect.label', {
|
||||
defaultMessage: 'Index pattern',
|
||||
defaultMessage: 'Data view',
|
||||
});
|
||||
|
||||
export const IndexPatternSelect = ({
|
||||
|
@ -103,17 +109,14 @@ export const IndexPatternSelect = ({
|
|||
<EuiFormRow
|
||||
id={htmlId('indexPattern')}
|
||||
label={indexPatternLabel}
|
||||
helpText={
|
||||
fetchedIndex.defaultIndex &&
|
||||
defaultIndexPatternHelpText + (!useKibanaIndices ? queryAllIndexesHelpText : '')
|
||||
}
|
||||
helpText={fetchedIndex.defaultIndex && getIndexPatternHelpText(useKibanaIndices)}
|
||||
labelAppend={
|
||||
fetchedIndex.indexPatternString && !fetchedIndex.indexPattern ? (
|
||||
<EuiLink onClick={navigateToCreateIndexPatternPage}>
|
||||
<EuiText size="xs">
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.indexPatternSelect.createIndexPatternText"
|
||||
defaultMessage="Create index pattern"
|
||||
id="visTypeTimeseries.indexPatternSelect.createDataViewText"
|
||||
defaultMessage="Create data view"
|
||||
/>
|
||||
</EuiText>
|
||||
</EuiLink>
|
||||
|
|
|
@ -79,7 +79,7 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro
|
|||
aria-label={i18n.translate(
|
||||
'visTypeTimeseries.indexPatternSelect.switchModePopover.areaLabel',
|
||||
{
|
||||
defaultMessage: 'Configure index pattern selection mode',
|
||||
defaultMessage: 'Configure data view selection mode',
|
||||
}
|
||||
)}
|
||||
onClick={onButtonClick}
|
||||
|
@ -97,14 +97,13 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro
|
|||
>
|
||||
<EuiPopoverTitle>
|
||||
{i18n.translate('visTypeTimeseries.indexPatternSelect.switchModePopover.title', {
|
||||
defaultMessage: 'Index pattern selection mode',
|
||||
defaultMessage: 'Data view mode',
|
||||
})}
|
||||
</EuiPopoverTitle>
|
||||
<EuiText>
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.indexPatternSelect.switchModePopover.text"
|
||||
defaultMessage="An index pattern identifies one or more Elasticsearch indices that you want to explore.
|
||||
Kibana index patterns are used by default. {allowStringIndicesLabel}"
|
||||
defaultMessage="A data view groups and retrieves data from Elasticsearch. Disable this mode to directly query Elasticsearch indices instead. {allowStringIndicesLabel}"
|
||||
values={{
|
||||
allowStringIndicesLabel,
|
||||
}}
|
||||
|
@ -116,7 +115,7 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro
|
|||
label={i18n.translate(
|
||||
'visTypeTimeseries.indexPatternSelect.switchModePopover.useKibanaIndices',
|
||||
{
|
||||
defaultMessage: 'Use only index patterns',
|
||||
defaultMessage: 'Use Kibana data views',
|
||||
}
|
||||
)}
|
||||
onChange={switchMode}
|
||||
|
|
|
@ -119,8 +119,8 @@ export const SeriesConfig = (props) => {
|
|||
<EuiFlexGroup gutterSize="s" responsive={false} wrap={true}>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiFormRow
|
||||
label={i18n.translate('visTypeTimeseries.seriesConfig.overrideIndexPatternLabel', {
|
||||
defaultMessage: 'Override Index Pattern?',
|
||||
label={i18n.translate('visTypeTimeseries.seriesConfig.overrideDataViewLabel', {
|
||||
defaultMessage: 'Override data view?',
|
||||
})}
|
||||
>
|
||||
<YesNo
|
||||
|
|
|
@ -33,8 +33,8 @@ export const UseIndexPatternModeCallout = () => {
|
|||
<EuiCallOut
|
||||
title={
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationTitle"
|
||||
defaultMessage="TSVB now supports index patterns"
|
||||
id="visTypeTimeseries.visEditorVisualization.dataViewMode.notificationTitle"
|
||||
defaultMessage="TSVB supports data views"
|
||||
/>
|
||||
}
|
||||
iconType="cheer"
|
||||
|
@ -42,13 +42,13 @@ export const UseIndexPatternModeCallout = () => {
|
|||
>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationMessage"
|
||||
defaultMessage="Great news! You can now visualize the data from Kibana index patterns (recommended) or Elasticsearch indices. {indexPatternModeLink}."
|
||||
id="visTypeTimeseries.visEditorVisualization.dataViewMode.notificationMessage"
|
||||
defaultMessage="Great news! You can visualize the data from Kibana data views (recommended) or Elasticsearch indices. {indexPatternModeLink}."
|
||||
values={{
|
||||
indexPatternModeLink: (
|
||||
<EuiLink href={indexPatternModeLink} target="_blank" external>
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.link"
|
||||
id="visTypeTimeseries.visEditorVisualization.dataViewMode.link"
|
||||
defaultMessage="Check it out."
|
||||
/>
|
||||
</EuiLink>
|
||||
|
@ -59,7 +59,7 @@ export const UseIndexPatternModeCallout = () => {
|
|||
<EuiFlexGroup gutterSize="none">
|
||||
<EuiButton size="s" onClick={dismissNotice}>
|
||||
<FormattedMessage
|
||||
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.dismissNoticeButtonText"
|
||||
id="visTypeTimeseries.visEditorVisualization.dataViewMode.dismissNoticeButtonText"
|
||||
defaultMessage="Dismiss"
|
||||
/>
|
||||
</EuiButton>
|
||||
|
|
|
@ -538,8 +538,8 @@ export const TimeseriesConfig = injectI18n(function (props) {
|
|||
<EuiFlexGroup gutterSize="s" responsive={false} wrap={true}>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiFormRow
|
||||
label={i18n.translate('visTypeTimeseries.timeSeries.overrideIndexPatternLabel', {
|
||||
defaultMessage: 'Override Index Pattern?',
|
||||
label={i18n.translate('visTypeTimeseries.timeSeries.overrideDataViewLabel', {
|
||||
defaultMessage: 'Override data view?',
|
||||
})}
|
||||
>
|
||||
<YesNo
|
||||
|
|
|
@ -71,9 +71,9 @@ export class SearchSelection extends React.Component<SearchSelectionProps> {
|
|||
type: 'index-pattern',
|
||||
getIconForSavedObject: () => 'indexPatternApp',
|
||||
name: i18n.translate(
|
||||
'visualizations.newVisWizard.searchSelection.savedObjectType.indexPattern',
|
||||
'visualizations.newVisWizard.searchSelection.savedObjectType.dataView',
|
||||
{
|
||||
defaultMessage: 'Index pattern',
|
||||
defaultMessage: 'Data view',
|
||||
}
|
||||
),
|
||||
},
|
||||
|
|
|
@ -122,7 +122,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
describe('index pattern deletion', function indexDelete() {
|
||||
before(function () {
|
||||
const expectedAlertText = 'Delete index pattern?';
|
||||
const expectedAlertText = 'Delete data view?';
|
||||
return PageObjects.settings.removeIndexPattern().then(function (alertText) {
|
||||
expect(alertText).to.be(expectedAlertText);
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@ export const processorEventRt = t.union([
|
|||
* Processor events that are searchable in the UI via the query bar.
|
||||
*
|
||||
* Some client-sideroutes will define 1 or more processor events that
|
||||
* will be used to fetch the dynamic index pattern for the query bar.
|
||||
* will be used to fetch the dynamic data view for the query bar.
|
||||
*/
|
||||
|
||||
export type UIProcessorEvent =
|
||||
|
|
|
@ -18,8 +18,8 @@ import { dataPluginMock } from 'src/plugins/data/public/mocks';
|
|||
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
|
||||
import { ApmPluginStartDeps } from '../plugin';
|
||||
|
||||
jest.mock('../services/rest/index_pattern', () => ({
|
||||
createStaticIndexPattern: () => Promise.resolve(undefined),
|
||||
jest.mock('../services/rest/data_view', () => ({
|
||||
createStaticDataView: () => Promise.resolve(undefined),
|
||||
}));
|
||||
|
||||
describe('renderApp', () => {
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
} from '../../../../../src/core/public';
|
||||
import { ApmPluginSetupDeps, ApmPluginStartDeps } from '../plugin';
|
||||
import { createCallApmApi } from '../services/rest/createCallApmApi';
|
||||
import { createStaticIndexPattern } from '../services/rest/index_pattern';
|
||||
import { createStaticDataView } from '../services/rest/data_view';
|
||||
import { setHelpExtension } from '../setHelpExtension';
|
||||
import { setReadonlyBadge } from '../updateBadge';
|
||||
import { ApmAppRoot } from '../components/routing/app_root';
|
||||
|
@ -58,10 +58,10 @@ export const renderApp = ({
|
|||
setReadonlyBadge(coreStart);
|
||||
createCallApmApi(coreStart);
|
||||
|
||||
// Automatically creates static index pattern and stores as saved object
|
||||
createStaticIndexPattern().catch((e) => {
|
||||
// Automatically creates static data view and stores as saved object
|
||||
createStaticDataView().catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Error creating static index pattern', e);
|
||||
console.log('Error creating static data view', e);
|
||||
});
|
||||
|
||||
// add .kbnAppWrappers class to root element
|
||||
|
|
|
@ -31,7 +31,7 @@ import { UrlParamsProvider } from '../context/url_params_context/url_params_cont
|
|||
import { ConfigSchema } from '../index';
|
||||
import { ApmPluginSetupDeps, ApmPluginStartDeps } from '../plugin';
|
||||
import { createCallApmApi } from '../services/rest/createCallApmApi';
|
||||
import { createStaticIndexPattern } from '../services/rest/index_pattern';
|
||||
import { createStaticDataView } from '../services/rest/data_view';
|
||||
import { UXActionMenu } from '../components/app/RumDashboard/ActionMenu';
|
||||
import { redirectTo } from '../components/routing/redirect_to';
|
||||
import {
|
||||
|
@ -168,10 +168,10 @@ export const renderApp = ({
|
|||
|
||||
createCallApmApi(core);
|
||||
|
||||
// Automatically creates static index pattern and stores as saved object
|
||||
createStaticIndexPattern().catch((e) => {
|
||||
// Automatically creates static data view and stores as saved object
|
||||
createStaticDataView().catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Error creating static index pattern', e);
|
||||
console.log('Error creating static data view', e);
|
||||
});
|
||||
|
||||
ReactDOM.render(
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
TRANSACTION_TYPE,
|
||||
} from '../../../../../common/elasticsearch_fieldnames';
|
||||
import { TRANSACTION_PAGE_LOAD } from '../../../../../common/transaction_types';
|
||||
import { useIndexPattern } from './use_index_pattern';
|
||||
import { useDataView } from './use_data_view';
|
||||
import { environmentQuery } from './queries';
|
||||
import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values';
|
||||
import { useUxUrlParams } from '../../../../context/url_params_context/use_ux_url_params';
|
||||
|
@ -52,7 +52,7 @@ const RUM_DATA_FILTERS = [
|
|||
];
|
||||
|
||||
function LocalUIFilters() {
|
||||
const { indexPatternTitle, indexPattern } = useIndexPattern();
|
||||
const { dataViewTitle, dataView } = useDataView();
|
||||
|
||||
const {
|
||||
filters = [],
|
||||
|
@ -108,7 +108,7 @@ function LocalUIFilters() {
|
|||
<FieldValueSuggestions
|
||||
key={filterName}
|
||||
sourceField={uxFiltersByName[filterName].fieldName}
|
||||
indexPatternTitle={indexPatternTitle}
|
||||
indexPatternTitle={dataViewTitle}
|
||||
label={uxFiltersByName[filterName].title}
|
||||
asCombobox={false}
|
||||
selectedValue={
|
||||
|
@ -144,7 +144,7 @@ function LocalUIFilters() {
|
|||
}}
|
||||
clearValues={clearValues}
|
||||
invertFilter={invertFilter}
|
||||
indexPattern={indexPattern}
|
||||
indexPattern={dataView}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -5,31 +5,31 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { useDynamicIndexPatternFetcher } from '../../../../hooks/use_dynamic_index_pattern';
|
||||
import { useDynamicDataViewFetcher } from '../../../../hooks/use_dynamic_data_view';
|
||||
import {
|
||||
IndexPattern,
|
||||
IndexPatternSpec,
|
||||
DataView,
|
||||
DataViewSpec,
|
||||
} from '../../../../../../../../src/plugins/data/common';
|
||||
import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { useFetcher } from '../../../../hooks/use_fetcher';
|
||||
import { DataPublicPluginStart } from '../../../../../../../../src/plugins/data/public';
|
||||
|
||||
export function useIndexPattern() {
|
||||
const { indexPattern: indexPatternDynamic } = useDynamicIndexPatternFetcher();
|
||||
export function useDataView() {
|
||||
const { dataView } = useDynamicDataViewFetcher();
|
||||
|
||||
const {
|
||||
services: {
|
||||
data: { indexPatterns },
|
||||
data: { dataViews },
|
||||
},
|
||||
} = useKibana<{ data: DataPublicPluginStart }>();
|
||||
|
||||
const { data } = useFetcher<Promise<IndexPattern | undefined>>(async () => {
|
||||
if (indexPatternDynamic?.title) {
|
||||
return indexPatterns.create({
|
||||
pattern: indexPatternDynamic?.title,
|
||||
} as IndexPatternSpec);
|
||||
const { data } = useFetcher<Promise<DataView | undefined>>(async () => {
|
||||
if (dataView?.title) {
|
||||
return dataViews.create({
|
||||
pattern: dataView?.title,
|
||||
} as DataViewSpec);
|
||||
}
|
||||
}, [indexPatternDynamic?.title, indexPatterns]);
|
||||
}, [dataView?.title, dataViews]);
|
||||
|
||||
return { indexPatternTitle: indexPatternDynamic?.title, indexPattern: data };
|
||||
return { dataViewTitle: dataView?.title, dataView: data };
|
||||
}
|
|
@ -178,7 +178,7 @@ export function ApmIndices() {
|
|||
<>
|
||||
<EuiText color="subdued">
|
||||
{i18n.translate('xpack.apm.settings.apmIndices.description', {
|
||||
defaultMessage: `The APM UI uses index patterns to query your APM indices. If you've customized the index names that APM Server writes events to, you may need to update these patterns for the APM UI to work. Settings here take precedence over those set in kibana.yml.`,
|
||||
defaultMessage: `The APM UI uses data views to query your APM indices. If you've customized the index names that APM Server writes events to, you may need to update these patterns for the APM UI to work. Settings here take precedence over those set in kibana.yml.`,
|
||||
})}
|
||||
</EuiText>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
} from '../../../context/apm_plugin/mock_apm_plugin_context';
|
||||
import { FETCH_STATUS } from '../../../hooks/use_fetcher';
|
||||
import { clearCache } from '../../../services/rest/callApi';
|
||||
import * as useDynamicIndexPatternHooks from '../../../hooks/use_dynamic_index_pattern';
|
||||
import * as useDynamicDataViewHooks from '../../../hooks/use_dynamic_data_view';
|
||||
import { SessionStorageMock } from '../../../services/__mocks__/SessionStorageMock';
|
||||
import { MockUrlParamsContextProvider } from '../../../context/url_params_context/mock_url_params_context_provider';
|
||||
import * as hook from '../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context';
|
||||
|
@ -85,9 +85,9 @@ describe('ServiceInventory', () => {
|
|||
});
|
||||
|
||||
jest
|
||||
.spyOn(useDynamicIndexPatternHooks, 'useDynamicIndexPatternFetcher')
|
||||
.spyOn(useDynamicDataViewHooks, 'useDynamicDataViewFetcher')
|
||||
.mockReturnValue({
|
||||
indexPattern: undefined,
|
||||
dataView: undefined,
|
||||
status: FETCH_STATUS.SUCCESS,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
mockApmPluginContextValue,
|
||||
MockApmPluginContextWrapper,
|
||||
} from '../../../context/apm_plugin/mock_apm_plugin_context';
|
||||
import * as useDynamicIndexPatternHooks from '../../../hooks/use_dynamic_index_pattern';
|
||||
import * as useDynamicDataViewHooks from '../../../hooks/use_dynamic_data_view';
|
||||
import { FETCH_STATUS } from '../../../hooks/use_fetcher';
|
||||
import * as useAnnotationsHooks from '../../../context/annotations/use_annotations_context';
|
||||
import * as useTransactionBreakdownHooks from '../../shared/charts/transaction_breakdown_chart/use_transaction_breakdown';
|
||||
|
@ -91,9 +91,9 @@ describe('ServiceOverview', () => {
|
|||
.spyOn(useAnnotationsHooks, 'useAnnotationsContext')
|
||||
.mockReturnValue({ annotations: [] });
|
||||
jest
|
||||
.spyOn(useDynamicIndexPatternHooks, 'useDynamicIndexPatternFetcher')
|
||||
.spyOn(useDynamicDataViewHooks, 'useDynamicDataViewFetcher')
|
||||
.mockReturnValue({
|
||||
indexPattern: undefined,
|
||||
dataView: undefined,
|
||||
status: FETCH_STATUS.SUCCESS,
|
||||
});
|
||||
|
||||
|
|
|
@ -10,15 +10,15 @@ import { i18n } from '@kbn/i18n';
|
|||
import { uniqueId } from 'lodash';
|
||||
import React, { useState } from 'react';
|
||||
import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { DataView } from '../../../../../../../src/plugins/data/common';
|
||||
import {
|
||||
esKuery,
|
||||
IndexPattern,
|
||||
QuerySuggestion,
|
||||
} from '../../../../../../../src/plugins/data/public';
|
||||
import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context';
|
||||
import { useUrlParams } from '../../../context/url_params_context/use_url_params';
|
||||
import { useApmParams } from '../../../hooks/use_apm_params';
|
||||
import { useDynamicIndexPatternFetcher } from '../../../hooks/use_dynamic_index_pattern';
|
||||
import { useDynamicDataViewFetcher } from '../../../hooks/use_dynamic_data_view';
|
||||
import { fromQuery, toQuery } from '../Links/url_helpers';
|
||||
import { getBoolFilter } from './get_bool_filter';
|
||||
// @ts-expect-error
|
||||
|
@ -30,9 +30,9 @@ interface State {
|
|||
isLoadingSuggestions: boolean;
|
||||
}
|
||||
|
||||
function convertKueryToEsQuery(kuery: string, indexPattern: IndexPattern) {
|
||||
function convertKueryToEsQuery(kuery: string, dataView: DataView) {
|
||||
const ast = esKuery.fromKueryExpression(kuery);
|
||||
return esKuery.toElasticsearchQuery(ast, indexPattern);
|
||||
return esKuery.toElasticsearchQuery(ast, dataView);
|
||||
}
|
||||
|
||||
export function KueryBar(props: {
|
||||
|
@ -70,7 +70,7 @@ export function KueryBar(props: {
|
|||
|
||||
const example = examples[processorEvent || 'defaults'];
|
||||
|
||||
const { indexPattern } = useDynamicIndexPatternFetcher();
|
||||
const { dataView } = useDynamicDataViewFetcher();
|
||||
|
||||
const placeholder =
|
||||
props.placeholder ??
|
||||
|
@ -88,7 +88,7 @@ export function KueryBar(props: {
|
|||
});
|
||||
|
||||
async function onChange(inputValue: string, selectionStart: number) {
|
||||
if (indexPattern == null) {
|
||||
if (dataView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ export function KueryBar(props: {
|
|||
const suggestions = (
|
||||
(await data.autocomplete.getQuerySuggestions({
|
||||
language: 'kuery',
|
||||
indexPatterns: [indexPattern],
|
||||
indexPatterns: [dataView],
|
||||
boolFilter:
|
||||
props.boolFilter ??
|
||||
getBoolFilter({
|
||||
|
@ -130,15 +130,12 @@ export function KueryBar(props: {
|
|||
}
|
||||
|
||||
function onSubmit(inputValue: string) {
|
||||
if (indexPattern == null) {
|
||||
if (dataView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const res = convertKueryToEsQuery(
|
||||
inputValue,
|
||||
indexPattern as IndexPattern
|
||||
);
|
||||
const res = convertKueryToEsQuery(inputValue, dataView as DataView);
|
||||
if (!res) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
|
||||
import { useFetcher } from './use_fetcher';
|
||||
|
||||
export function useDynamicIndexPatternFetcher() {
|
||||
export function useDynamicDataViewFetcher() {
|
||||
const { data, status } = useFetcher((callApmApi) => {
|
||||
return callApmApi({
|
||||
endpoint: 'GET /internal/apm/index_pattern/dynamic',
|
||||
endpoint: 'GET /internal/apm/data_view/dynamic',
|
||||
isCachable: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
return {
|
||||
indexPattern: data?.dynamicIndexPattern,
|
||||
dataView: data?.dynamicDataView,
|
||||
status,
|
||||
};
|
||||
}
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import { callApmApi } from './createCallApmApi';
|
||||
|
||||
export const createStaticIndexPattern = async () => {
|
||||
export const createStaticDataView = async () => {
|
||||
return await callApmApi({
|
||||
endpoint: 'POST /internal/apm/index_pattern/static',
|
||||
endpoint: 'POST /internal/apm/data_view/static',
|
||||
signal: null,
|
||||
});
|
||||
};
|
|
@ -185,7 +185,6 @@ export async function inspectSearchParams(
|
|||
apmAgentConfigurationIndex: 'myIndex',
|
||||
apmCustomLinkIndex: 'myIndex',
|
||||
},
|
||||
dynamicIndexPattern: null as any,
|
||||
};
|
||||
try {
|
||||
response = await fn(mockSetup);
|
||||
|
|
|
@ -40,7 +40,7 @@ import { ESClient, getEsClient } from '../shared/get_es_client';
|
|||
// - from: start of the date range that should be processed. Should be a valid ISO timestamp.
|
||||
// - to: end of the date range that should be processed. Should be a valid ISO timestamp.
|
||||
// - source: from which transaction documents should be read. Should be location of ES (basic auth
|
||||
// is supported) plus the index name (or an index pattern). Example:
|
||||
// is supported) plus the index name (or an data view). Example:
|
||||
// https://foo:bar@apm.elstc.co:9999/apm-8.0.0-transaction
|
||||
// - dest: to which metric documents should be written. If this is not set, no metric documents
|
||||
// will be created.Should be location of ES (basic auth is supported) plus the index name.
|
||||
|
|
|
@ -50,10 +50,10 @@ export async function createAnomalyDetectionJobs(
|
|||
`Creating ML anomaly detection jobs for environments: [${uniqueMlJobEnvs}].`
|
||||
);
|
||||
|
||||
const indexPatternName = indices.metric;
|
||||
const dataViewName = indices.metric;
|
||||
const responses = await Promise.all(
|
||||
uniqueMlJobEnvs.map((environment) =>
|
||||
createAnomalyDetectionJob({ ml, environment, indexPatternName })
|
||||
createAnomalyDetectionJob({ ml, environment, dataViewName })
|
||||
)
|
||||
);
|
||||
const jobResponses = responses.flatMap((response) => response.jobs);
|
||||
|
@ -73,11 +73,11 @@ export async function createAnomalyDetectionJobs(
|
|||
async function createAnomalyDetectionJob({
|
||||
ml,
|
||||
environment,
|
||||
indexPatternName,
|
||||
dataViewName,
|
||||
}: {
|
||||
ml: Required<Setup>['ml'];
|
||||
environment: string;
|
||||
indexPatternName: string;
|
||||
dataViewName: string;
|
||||
}) {
|
||||
return withApmSpan('create_anomaly_detection_job', async () => {
|
||||
const randomToken = uuid().substr(-4);
|
||||
|
@ -86,7 +86,7 @@ async function createAnomalyDetectionJob({
|
|||
moduleId: ML_MODULE_ID_APM_TRANSACTION,
|
||||
prefix: `${APM_ML_JOB_GROUP}-${snakeCase(environment)}-${randomToken}-`,
|
||||
groups: [APM_ML_JOB_GROUP],
|
||||
indexPatternName,
|
||||
indexPatternName: dataViewName,
|
||||
applyToAllSpaces: true,
|
||||
start: moment().subtract(4, 'weeks').valueOf(),
|
||||
query: {
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { createStaticIndexPattern } from './create_static_index_pattern';
|
||||
import { createStaticDataView } from './create_static_data_view';
|
||||
import { Setup } from '../helpers/setup_request';
|
||||
import * as HistoricalAgentData from '../../routes/historical_data/has_historical_agent_data';
|
||||
import { InternalSavedObjectsClient } from '../helpers/get_internal_saved_objects_client';
|
||||
import { APMConfig } from '../..';
|
||||
|
||||
function getMockSavedObjectsClient(existingIndexPatternTitle: string) {
|
||||
function getMockSavedObjectsClient(existingDataViewTitle: string) {
|
||||
return {
|
||||
get: jest.fn(() => ({
|
||||
attributes: {
|
||||
title: existingIndexPatternTitle,
|
||||
title: existingDataViewTitle,
|
||||
},
|
||||
})),
|
||||
create: jest.fn(),
|
||||
|
@ -31,10 +31,10 @@ const setup = {
|
|||
} as APMConfig['indices'],
|
||||
} as unknown as Setup;
|
||||
|
||||
describe('createStaticIndexPattern', () => {
|
||||
it(`should not create index pattern if 'xpack.apm.autocreateApmIndexPattern=false'`, async () => {
|
||||
describe('createStaticDataView', () => {
|
||||
it(`should not create data view if 'xpack.apm.autocreateApmIndexPattern=false'`, async () => {
|
||||
const savedObjectsClient = getMockSavedObjectsClient('apm-*');
|
||||
await createStaticIndexPattern({
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: false } as APMConfig,
|
||||
savedObjectsClient,
|
||||
|
@ -43,7 +43,7 @@ describe('createStaticIndexPattern', () => {
|
|||
expect(savedObjectsClient.create).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it(`should not create index pattern if no APM data is found`, async () => {
|
||||
it(`should not create data view if no APM data is found`, async () => {
|
||||
// does not have APM data
|
||||
jest
|
||||
.spyOn(HistoricalAgentData, 'hasHistoricalAgentData')
|
||||
|
@ -51,7 +51,7 @@ describe('createStaticIndexPattern', () => {
|
|||
|
||||
const savedObjectsClient = getMockSavedObjectsClient('apm-*');
|
||||
|
||||
await createStaticIndexPattern({
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
|
@ -60,7 +60,7 @@ describe('createStaticIndexPattern', () => {
|
|||
expect(savedObjectsClient.create).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it(`should create index pattern`, async () => {
|
||||
it(`should create data view`, async () => {
|
||||
// does have APM data
|
||||
jest
|
||||
.spyOn(HistoricalAgentData, 'hasHistoricalAgentData')
|
||||
|
@ -68,7 +68,7 @@ describe('createStaticIndexPattern', () => {
|
|||
|
||||
const savedObjectsClient = getMockSavedObjectsClient('apm-*');
|
||||
|
||||
await createStaticIndexPattern({
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
|
@ -78,17 +78,17 @@ describe('createStaticIndexPattern', () => {
|
|||
expect(savedObjectsClient.create).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it(`should overwrite the index pattern if the new index pattern title does not match the old index pattern title`, async () => {
|
||||
it(`should overwrite the data view if the new data view title does not match the old data view title`, async () => {
|
||||
// does have APM data
|
||||
jest
|
||||
.spyOn(HistoricalAgentData, 'hasHistoricalAgentData')
|
||||
.mockResolvedValue(true);
|
||||
|
||||
const savedObjectsClient = getMockSavedObjectsClient('apm-*');
|
||||
const expectedIndexPatternTitle =
|
||||
const expectedDataViewTitle =
|
||||
'apm-*-transaction-*,apm-*-span-*,apm-*-error-*,apm-*-metrics-*';
|
||||
|
||||
await createStaticIndexPattern({
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
|
@ -99,13 +99,13 @@ describe('createStaticIndexPattern', () => {
|
|||
expect(savedObjectsClient.create).toHaveBeenCalled();
|
||||
// @ts-ignore
|
||||
expect(savedObjectsClient.create.mock.calls[0][1].title).toBe(
|
||||
expectedIndexPatternTitle
|
||||
expectedDataViewTitle
|
||||
);
|
||||
// @ts-ignore
|
||||
expect(savedObjectsClient.create.mock.calls[0][2].overwrite).toBe(true);
|
||||
});
|
||||
|
||||
it(`should not overwrite an index pattern if the new index pattern title matches the old index pattern title`, async () => {
|
||||
it(`should not overwrite an data view if the new data view title matches the old data view title`, async () => {
|
||||
// does have APM data
|
||||
jest
|
||||
.spyOn(HistoricalAgentData, 'hasHistoricalAgentData')
|
||||
|
@ -115,7 +115,7 @@ describe('createStaticIndexPattern', () => {
|
|||
'apm-*-transaction-*,apm-*-span-*,apm-*-error-*,apm-*-metrics-*'
|
||||
);
|
||||
|
||||
await createStaticIndexPattern({
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
savedObjectsClient,
|
|
@ -7,19 +7,19 @@
|
|||
|
||||
import { SavedObjectsErrorHelpers } from '../../../../../../src/core/server';
|
||||
import { APM_STATIC_INDEX_PATTERN_ID } from '../../../common/index_pattern_constants';
|
||||
import apmIndexPattern from '../../tutorial/index_pattern.json';
|
||||
import apmDataView from '../../tutorial/index_pattern.json';
|
||||
import { hasHistoricalAgentData } from '../../routes/historical_data/has_historical_agent_data';
|
||||
import { Setup } from '../helpers/setup_request';
|
||||
import { APMRouteHandlerResources } from '../../routes/typings';
|
||||
import { InternalSavedObjectsClient } from '../helpers/get_internal_saved_objects_client.js';
|
||||
import { withApmSpan } from '../../utils/with_apm_span';
|
||||
import { getApmIndexPatternTitle } from './get_apm_index_pattern_title';
|
||||
import { getApmDataViewTitle } from './get_apm_data_view_title';
|
||||
|
||||
type ApmIndexPatternAttributes = typeof apmIndexPattern.attributes & {
|
||||
type ApmDataViewAttributes = typeof apmDataView.attributes & {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export async function createStaticIndexPattern({
|
||||
export async function createStaticDataView({
|
||||
setup,
|
||||
config,
|
||||
savedObjectsClient,
|
||||
|
@ -32,22 +32,22 @@ export async function createStaticIndexPattern({
|
|||
spaceId?: string;
|
||||
overwrite?: boolean;
|
||||
}): Promise<boolean> {
|
||||
return withApmSpan('create_static_index_pattern', async () => {
|
||||
// don't autocreate APM index pattern if it's been disabled via the config
|
||||
return withApmSpan('create_static_data_view', async () => {
|
||||
// don't autocreate APM data view if it's been disabled via the config
|
||||
if (!config.autocreateApmIndexPattern) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Discover and other apps will throw errors if an index pattern exists without having matching indices.
|
||||
// The following ensures the index pattern is only created if APM data is found
|
||||
// Discover and other apps will throw errors if an data view exists without having matching indices.
|
||||
// The following ensures the data view is only created if APM data is found
|
||||
const hasData = await hasHistoricalAgentData(setup);
|
||||
if (!hasData) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const apmIndexPatternTitle = getApmIndexPatternTitle(setup.indices);
|
||||
const apmDataViewTitle = getApmDataViewTitle(setup.indices);
|
||||
const forceOverwrite = await getForceOverwrite({
|
||||
apmIndexPatternTitle,
|
||||
apmDataViewTitle,
|
||||
overwrite,
|
||||
savedObjectsClient,
|
||||
});
|
||||
|
@ -57,8 +57,8 @@ export async function createStaticIndexPattern({
|
|||
savedObjectsClient.create(
|
||||
'index-pattern',
|
||||
{
|
||||
...apmIndexPattern.attributes,
|
||||
title: apmIndexPatternTitle,
|
||||
...apmDataView.attributes,
|
||||
title: apmDataViewTitle,
|
||||
},
|
||||
{
|
||||
id: APM_STATIC_INDEX_PATTERN_ID,
|
||||
|
@ -69,7 +69,7 @@ export async function createStaticIndexPattern({
|
|||
);
|
||||
return true;
|
||||
} catch (e) {
|
||||
// if the index pattern (saved object) already exists a conflict error (code: 409) will be thrown
|
||||
// if the data view (saved object) already exists a conflict error (code: 409) will be thrown
|
||||
// that error should be silenced
|
||||
if (SavedObjectsErrorHelpers.isConflictError(e)) {
|
||||
return false;
|
||||
|
@ -79,28 +79,28 @@ export async function createStaticIndexPattern({
|
|||
});
|
||||
}
|
||||
|
||||
// force an overwrite of the index pattern if the index pattern has been changed
|
||||
// force an overwrite of the data view if the data view has been changed
|
||||
async function getForceOverwrite({
|
||||
savedObjectsClient,
|
||||
overwrite,
|
||||
apmIndexPatternTitle,
|
||||
apmDataViewTitle,
|
||||
}: {
|
||||
savedObjectsClient: InternalSavedObjectsClient;
|
||||
overwrite: boolean;
|
||||
apmIndexPatternTitle: string;
|
||||
apmDataViewTitle: string;
|
||||
}) {
|
||||
if (!overwrite) {
|
||||
try {
|
||||
const existingIndexPattern =
|
||||
await savedObjectsClient.get<ApmIndexPatternAttributes>(
|
||||
const existingDataView =
|
||||
await savedObjectsClient.get<ApmDataViewAttributes>(
|
||||
'index-pattern',
|
||||
APM_STATIC_INDEX_PATTERN_ID
|
||||
);
|
||||
|
||||
// if the existing index pattern does not matches the new one, force an update
|
||||
return existingIndexPattern.attributes.title !== apmIndexPatternTitle;
|
||||
// if the existing data view does not matches the new one, force an update
|
||||
return existingDataView.attributes.title !== apmDataViewTitle;
|
||||
} catch (e) {
|
||||
// ignore exception if the index pattern (saved object) is not found
|
||||
// ignore exception if the data view (saved object) is not found
|
||||
if (SavedObjectsErrorHelpers.isNotFoundError(e)) {
|
||||
return false;
|
||||
}
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices';
|
||||
import { getApmIndexPatternTitle } from './get_apm_index_pattern_title';
|
||||
import { getApmDataViewTitle } from './get_apm_data_view_title';
|
||||
|
||||
describe('getApmIndexPatternTitle', () => {
|
||||
it('returns an index pattern title by combining existing indicies', () => {
|
||||
const title = getApmIndexPatternTitle({
|
||||
describe('getApmDataViewTitle', () => {
|
||||
it('returns a data view title by combining existing indicies', () => {
|
||||
const title = getApmDataViewTitle({
|
||||
transaction: 'apm-*-transaction-*',
|
||||
span: 'apm-*-span-*',
|
||||
error: 'apm-*-error-*',
|
||||
|
@ -22,7 +22,7 @@ describe('getApmIndexPatternTitle', () => {
|
|||
});
|
||||
|
||||
it('removes duplicates', () => {
|
||||
const title = getApmIndexPatternTitle({
|
||||
const title = getApmDataViewTitle({
|
||||
transaction: 'apm-*',
|
||||
span: 'apm-*',
|
||||
error: 'apm-*',
|
|
@ -8,7 +8,7 @@
|
|||
import { uniq } from 'lodash';
|
||||
import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices';
|
||||
|
||||
export function getApmIndexPatternTitle(apmIndicesConfig: ApmIndicesConfig) {
|
||||
export function getApmDataViewTitle(apmIndicesConfig: ApmIndicesConfig) {
|
||||
return uniq([
|
||||
apmIndicesConfig.transaction,
|
||||
apmIndicesConfig.span,
|
|
@ -12,51 +12,51 @@ import {
|
|||
import { APMRouteHandlerResources } from '../../routes/typings';
|
||||
import { withApmSpan } from '../../utils/with_apm_span';
|
||||
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
|
||||
import { getApmIndexPatternTitle } from './get_apm_index_pattern_title';
|
||||
import { getApmDataViewTitle } from './get_apm_data_view_title';
|
||||
|
||||
export interface IndexPatternTitleAndFields {
|
||||
export interface DataViewTitleAndFields {
|
||||
title: string;
|
||||
timeFieldName: string;
|
||||
fields: FieldDescriptor[];
|
||||
}
|
||||
|
||||
export const getDynamicIndexPattern = ({
|
||||
export const getDynamicDataView = ({
|
||||
config,
|
||||
context,
|
||||
logger,
|
||||
}: Pick<APMRouteHandlerResources, 'logger' | 'config' | 'context'>) => {
|
||||
return withApmSpan('get_dynamic_index_pattern', async () => {
|
||||
return withApmSpan('get_dynamic_data_view', async () => {
|
||||
const apmIndicies = await getApmIndices({
|
||||
savedObjectsClient: context.core.savedObjects.client,
|
||||
config,
|
||||
});
|
||||
const indexPatternTitle = getApmIndexPatternTitle(apmIndicies);
|
||||
const dataViewTitle = getApmDataViewTitle(apmIndicies);
|
||||
|
||||
const indexPatternsFetcher = new IndexPatternsFetcher(
|
||||
const DataViewsFetcher = new IndexPatternsFetcher(
|
||||
context.core.elasticsearch.client.asCurrentUser
|
||||
);
|
||||
|
||||
// Since `getDynamicIndexPattern` is called in setup_request (and thus by every endpoint)
|
||||
// Since `getDynamicDataView` is called in setup_request (and thus by every endpoint)
|
||||
// and since `getFieldsForWildcard` will throw if the specified indices don't exist,
|
||||
// we have to catch errors here to avoid all endpoints returning 500 for users without APM data
|
||||
// (would be a bad first time experience)
|
||||
try {
|
||||
const fields = await indexPatternsFetcher.getFieldsForWildcard({
|
||||
pattern: indexPatternTitle,
|
||||
const fields = await DataViewsFetcher.getFieldsForWildcard({
|
||||
pattern: dataViewTitle,
|
||||
});
|
||||
|
||||
const indexPattern: IndexPatternTitleAndFields = {
|
||||
const dataView: DataViewTitleAndFields = {
|
||||
fields,
|
||||
timeFieldName: '@timestamp',
|
||||
title: indexPatternTitle,
|
||||
title: dataViewTitle,
|
||||
};
|
||||
|
||||
return indexPattern;
|
||||
return dataView;
|
||||
} catch (e) {
|
||||
const notExists = e.output?.statusCode === 404;
|
||||
if (notExists) {
|
||||
logger.error(
|
||||
`Could not get dynamic index pattern because indices "${indexPatternTitle}" don't exist`
|
||||
`Could not get dynamic data view because indices "${dataViewTitle}" don't exist`
|
||||
);
|
||||
return;
|
||||
}
|
|
@ -26,8 +26,8 @@ jest.mock('../settings/apm_indices/get_apm_indices', () => ({
|
|||
} as PromiseReturnType<typeof getApmIndices>),
|
||||
}));
|
||||
|
||||
jest.mock('../index_pattern/get_dynamic_index_pattern', () => ({
|
||||
getDynamicIndexPattern: async () => {
|
||||
jest.mock('../data_view/get_dynamic_data_view', () => ({
|
||||
getDynamicDataView: async () => {
|
||||
return;
|
||||
},
|
||||
}));
|
||||
|
|
|
@ -37,7 +37,6 @@ function getMockSetup(esResponse: any) {
|
|||
) as APMConfig,
|
||||
uiFilters: {},
|
||||
indices: mockIndices,
|
||||
dynamicIndexPattern: null as any,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { createStaticIndexPattern } from '../lib/index_pattern/create_static_index_pattern';
|
||||
import { createStaticDataView } from '../lib/data_view/create_static_data_view';
|
||||
import { createApmServerRouteRepository } from './create_apm_server_route_repository';
|
||||
import { setupRequest } from '../lib/helpers/setup_request';
|
||||
import { getDynamicIndexPattern } from '../lib/index_pattern/get_dynamic_index_pattern';
|
||||
import { getDynamicDataView } from '../lib/data_view/get_dynamic_data_view';
|
||||
import { createApmServerRoute } from './create_apm_server_route';
|
||||
|
||||
const staticIndexPatternRoute = createApmServerRoute({
|
||||
endpoint: 'POST /internal/apm/index_pattern/static',
|
||||
const staticDataViewRoute = createApmServerRoute({
|
||||
endpoint: 'POST /internal/apm/data_view/static',
|
||||
options: { tags: ['access:apm'] },
|
||||
handler: async (resources) => {
|
||||
const {
|
||||
|
@ -31,30 +31,30 @@ const staticIndexPatternRoute = createApmServerRoute({
|
|||
|
||||
const spaceId = spaces?.setup.spacesService.getSpaceId(request);
|
||||
|
||||
const didCreateIndexPattern = await createStaticIndexPattern({
|
||||
const didCreateDataView = await createStaticDataView({
|
||||
setup,
|
||||
config,
|
||||
savedObjectsClient,
|
||||
spaceId,
|
||||
});
|
||||
|
||||
return { created: didCreateIndexPattern };
|
||||
return { created: didCreateDataView };
|
||||
},
|
||||
});
|
||||
|
||||
const dynamicIndexPatternRoute = createApmServerRoute({
|
||||
endpoint: 'GET /internal/apm/index_pattern/dynamic',
|
||||
const dynamicDataViewRoute = createApmServerRoute({
|
||||
endpoint: 'GET /internal/apm/data_view/dynamic',
|
||||
options: { tags: ['access:apm'] },
|
||||
handler: async ({ context, config, logger }) => {
|
||||
const dynamicIndexPattern = await getDynamicIndexPattern({
|
||||
const dynamicDataView = await getDynamicDataView({
|
||||
context,
|
||||
config,
|
||||
logger,
|
||||
});
|
||||
return { dynamicIndexPattern };
|
||||
return { dynamicDataView };
|
||||
},
|
||||
});
|
||||
|
||||
export const indexPatternRouteRepository = createApmServerRouteRepository()
|
||||
.add(staticIndexPatternRoute)
|
||||
.add(dynamicIndexPatternRoute);
|
||||
export const dataViewRouteRepository = createApmServerRouteRepository()
|
||||
.add(staticDataViewRoute)
|
||||
.add(dynamicDataViewRoute);
|
|
@ -16,7 +16,7 @@ import { createApmServerRouteRepository } from './create_apm_server_route_reposi
|
|||
import { environmentsRouteRepository } from './environments';
|
||||
import { errorsRouteRepository } from './errors';
|
||||
import { apmFleetRouteRepository } from './fleet';
|
||||
import { indexPatternRouteRepository } from './index_pattern';
|
||||
import { dataViewRouteRepository } from './data_view';
|
||||
import { latencyDistributionRouteRepository } from './latency_distribution';
|
||||
import { metricsRouteRepository } from './metrics';
|
||||
import { observabilityOverviewRouteRepository } from './observability_overview';
|
||||
|
@ -39,7 +39,7 @@ import { suggestionsRouteRepository } from './suggestions';
|
|||
|
||||
const getTypedGlobalApmServerRouteRepository = () => {
|
||||
const repository = createApmServerRouteRepository()
|
||||
.merge(indexPatternRouteRepository)
|
||||
.merge(dataViewRouteRepository)
|
||||
.merge(environmentsRouteRepository)
|
||||
.merge(errorsRouteRepository)
|
||||
.merge(latencyDistributionRouteRepository)
|
||||
|
|
|
@ -14,11 +14,11 @@ import {
|
|||
} from '../../../../../src/plugins/home/server';
|
||||
import { CloudSetup } from '../../../cloud/server';
|
||||
import { APM_STATIC_INDEX_PATTERN_ID } from '../../common/index_pattern_constants';
|
||||
import { getApmIndexPatternTitle } from '../lib/index_pattern/get_apm_index_pattern_title';
|
||||
import { getApmDataViewTitle } from '../lib/data_view/get_apm_data_view_title';
|
||||
import { ApmIndicesConfig } from '../lib/settings/apm_indices/get_apm_indices';
|
||||
import { createElasticCloudInstructions } from './envs/elastic_cloud';
|
||||
import { onPremInstructions } from './envs/on_prem';
|
||||
import apmIndexPattern from './index_pattern.json';
|
||||
import apmDataView from './index_pattern.json';
|
||||
|
||||
const apmIntro = i18n.translate('xpack.apm.tutorial.introduction', {
|
||||
defaultMessage:
|
||||
|
@ -39,14 +39,14 @@ export const tutorialProvider =
|
|||
isFleetPluginEnabled: boolean;
|
||||
}) =>
|
||||
() => {
|
||||
const indexPatternTitle = getApmIndexPatternTitle(apmIndices);
|
||||
const indexPatternTitle = getApmDataViewTitle(apmIndices);
|
||||
|
||||
const savedObjects = [
|
||||
{
|
||||
...apmIndexPattern,
|
||||
...apmDataView,
|
||||
id: APM_STATIC_INDEX_PATTERN_ID,
|
||||
attributes: {
|
||||
...apmIndexPattern.attributes,
|
||||
...apmDataView.attributes,
|
||||
title: indexPatternTitle,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -96,7 +96,6 @@ export async function inspectSearchParams(
|
|||
apmAgentConfigurationIndex: 'myIndex',
|
||||
apmCustomLinkIndex: 'myIndex',
|
||||
},
|
||||
dynamicIndexPattern: null as any,
|
||||
};
|
||||
try {
|
||||
response = await fn(mockSetup);
|
||||
|
|
|
@ -62,16 +62,16 @@ export function getActions(
|
|||
});
|
||||
}
|
||||
|
||||
// Allow to edit index pattern field
|
||||
// Allow to edit data view field
|
||||
if (services.indexPatternFieldEditor?.userPermissions.editIndexPattern()) {
|
||||
actions.push({
|
||||
name: i18n.translate('xpack.dataVisualizer.index.dataGrid.editIndexPatternFieldTitle', {
|
||||
defaultMessage: 'Edit index pattern field',
|
||||
name: i18n.translate('xpack.dataVisualizer.index.dataGrid.editDataViewFieldTitle', {
|
||||
defaultMessage: 'Edit data view field',
|
||||
}),
|
||||
description: i18n.translate(
|
||||
'xpack.dataVisualizer.index.dataGrid.editIndexPatternFieldDescription',
|
||||
'xpack.dataVisualizer.index.dataGrid.editDataViewFieldDescription',
|
||||
{
|
||||
defaultMessage: 'Edit index pattern field',
|
||||
defaultMessage: 'Edit data view field',
|
||||
}
|
||||
),
|
||||
type: 'icon',
|
||||
|
@ -86,13 +86,13 @@ export function getActions(
|
|||
'data-test-subj': 'dataVisualizerActionEditIndexPatternFieldButton',
|
||||
});
|
||||
actions.push({
|
||||
name: i18n.translate('xpack.dataVisualizer.index.dataGrid.deleteIndexPatternFieldTitle', {
|
||||
defaultMessage: 'Delete index pattern field',
|
||||
name: i18n.translate('xpack.dataVisualizer.index.dataGrid.deleteDataViewFieldTitle', {
|
||||
defaultMessage: 'Delete data view field',
|
||||
}),
|
||||
description: i18n.translate(
|
||||
'xpack.dataVisualizer.index.dataGrid.deleteIndexPatternFieldDescription',
|
||||
{
|
||||
defaultMessage: 'Delete index pattern field',
|
||||
defaultMessage: 'Delete data view field',
|
||||
}
|
||||
),
|
||||
type: 'icon',
|
||||
|
|
|
@ -32,7 +32,7 @@ const defaultIcon = { iconType: 'questionInCircle', color: 'gray' };
|
|||
// Extended & modified version of src/plugins/kibana_react/public/field_icon/field_icon.tsx
|
||||
export const typeToEuiIconMap: Record<string, { iconType: string; color?: string }> = {
|
||||
boolean: { iconType: 'tokenBoolean' },
|
||||
// icon for an index pattern mapping conflict in discover
|
||||
// icon for a data view mapping conflict in discover
|
||||
conflict: { iconType: 'alert', color: 'euiColorVis9' },
|
||||
date: { iconType: 'tokenDate' },
|
||||
date_range: { iconType: 'tokenDate' },
|
||||
|
|
|
@ -241,8 +241,8 @@ export const ResultsLinks: FC<Props> = ({
|
|||
icon={<EuiIcon size="xxl" type={`managementApp`} />}
|
||||
title={
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.resultsLinks.indexPatternManagementTitle"
|
||||
defaultMessage="Index Pattern Management"
|
||||
id="xpack.dataVisualizer.file.resultsLinks.dataViewManagementTitle"
|
||||
defaultMessage="Data View Management"
|
||||
/>
|
||||
}
|
||||
description=""
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Formatter which uses the fieldFormat object of a Kibana index pattern
|
||||
* Formatter which uses the fieldFormat object of a Kibana data view
|
||||
* field to format the value of a field.
|
||||
*/
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ function title(statuses: Statuses) {
|
|||
case statuses.indexPatternCreatedStatus:
|
||||
return (
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.importErrors.creatingIndexPatternErrorMessage"
|
||||
defaultMessage="Error creating index pattern"
|
||||
id="xpack.dataVisualizer.file.importErrors.creatingDataViewErrorMessage"
|
||||
defaultMessage="Error creating data view"
|
||||
/>
|
||||
);
|
||||
case statuses.permissionCheckStatus:
|
||||
|
|
|
@ -103,10 +103,10 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => {
|
|||
defaultMessage: 'Upload data',
|
||||
}
|
||||
);
|
||||
let createIndexPatternTitle = i18n.translate(
|
||||
'xpack.dataVisualizer.file.importProgress.createIndexPatternTitle',
|
||||
let createDataViewTitle = i18n.translate(
|
||||
'xpack.dataVisualizer.file.importProgress.createDataViewTitle',
|
||||
{
|
||||
defaultMessage: 'Create index pattern',
|
||||
defaultMessage: 'Create data view',
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -199,17 +199,17 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => {
|
|||
}
|
||||
);
|
||||
if (createIndexPattern === true) {
|
||||
createIndexPatternTitle = i18n.translate(
|
||||
'xpack.dataVisualizer.file.importProgress.creatingIndexPatternTitle',
|
||||
createDataViewTitle = i18n.translate(
|
||||
'xpack.dataVisualizer.file.importProgress.creatingDataViewTitle',
|
||||
{
|
||||
defaultMessage: 'Creating index pattern',
|
||||
defaultMessage: 'Creating data view',
|
||||
}
|
||||
);
|
||||
statusInfo = (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.importProgress.creatingIndexPatternDescription"
|
||||
defaultMessage="Creating index pattern"
|
||||
id="xpack.dataVisualizer.file.importProgress.creatingDataViewDescription"
|
||||
defaultMessage="Creating data view"
|
||||
/>
|
||||
</p>
|
||||
);
|
||||
|
@ -218,10 +218,10 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => {
|
|||
}
|
||||
}
|
||||
if (completedStep >= 5) {
|
||||
createIndexPatternTitle = i18n.translate(
|
||||
'xpack.dataVisualizer.file.importProgress.indexPatternCreatedTitle',
|
||||
createDataViewTitle = i18n.translate(
|
||||
'xpack.dataVisualizer.file.importProgress.dataViewCreatedTitle',
|
||||
{
|
||||
defaultMessage: 'Index pattern created',
|
||||
defaultMessage: 'Data view created',
|
||||
}
|
||||
);
|
||||
statusInfo = null;
|
||||
|
@ -267,7 +267,7 @@ export const ImportProgress: FC<{ statuses: Statuses }> = ({ statuses }) => {
|
|||
|
||||
if (createIndexPattern === true) {
|
||||
steps.push({
|
||||
title: createIndexPatternTitle,
|
||||
title: createDataViewTitle,
|
||||
isSelected: uploadStatus === IMPORT_STATUS.COMPLETE,
|
||||
isComplete: indexPatternCreatedStatus === IMPORT_STATUS.COMPLETE,
|
||||
status: indexPatternCreatedStatus,
|
||||
|
|
|
@ -102,8 +102,8 @@ export const AdvancedSettings: FC<Props> = ({
|
|||
id="createIndexPattern"
|
||||
label={
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.advancedImportSettings.createIndexPatternLabel"
|
||||
defaultMessage="Create index pattern"
|
||||
id="xpack.dataVisualizer.file.advancedImportSettings.createDataViewLabel"
|
||||
defaultMessage="Create data view"
|
||||
/>
|
||||
}
|
||||
checked={createIndexPattern === true}
|
||||
|
@ -116,8 +116,8 @@ export const AdvancedSettings: FC<Props> = ({
|
|||
<EuiFormRow
|
||||
label={
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.advancedImportSettings.indexPatternNameLabel"
|
||||
defaultMessage="Index pattern name"
|
||||
id="xpack.dataVisualizer.file.advancedImportSettings.dataViewNameLabel"
|
||||
defaultMessage="Data view name"
|
||||
/>
|
||||
}
|
||||
isInvalid={indexPatternNameError !== ''}
|
||||
|
|
|
@ -73,8 +73,8 @@ export const SimpleSettings: FC<Props> = ({
|
|||
id="createIndexPattern"
|
||||
label={
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.simpleImportSettings.createIndexPatternLabel"
|
||||
defaultMessage="Create index pattern"
|
||||
id="xpack.dataVisualizer.file.simpleImportSettings.createDataViewLabel"
|
||||
defaultMessage="Create data view"
|
||||
/>
|
||||
}
|
||||
checked={createIndexPattern === true}
|
||||
|
|
|
@ -135,8 +135,8 @@ function createDisplayItems(
|
|||
items.splice(1, 0, {
|
||||
title: (
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.importSummary.indexPatternTitle"
|
||||
defaultMessage="Index pattern"
|
||||
id="xpack.dataVisualizer.file.importSummary.dataViewTitle"
|
||||
defaultMessage="Data view"
|
||||
/>
|
||||
),
|
||||
description: indexPattern,
|
||||
|
|
|
@ -433,7 +433,7 @@ export class ImportView extends Component {
|
|||
|
||||
this.setState({ indexPatternNames });
|
||||
} catch (error) {
|
||||
console.error('failed to load index patterns', error);
|
||||
console.error('failed to load data views', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -704,8 +704,8 @@ function isIndexPatternNameValid(name, indexPatternNames, index) {
|
|||
if (indexPatternNames.find((i) => i === name)) {
|
||||
return (
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.importView.indexPatternNameAlreadyExistsErrorMessage"
|
||||
defaultMessage="Index pattern name already exists"
|
||||
id="xpack.dataVisualizer.file.importView.dataViewNameAlreadyExistsErrorMessage"
|
||||
defaultMessage="Data view name already exists"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -720,8 +720,8 @@ function isIndexPatternNameValid(name, indexPatternNames, index) {
|
|||
// name should match index
|
||||
return (
|
||||
<FormattedMessage
|
||||
id="xpack.dataVisualizer.file.importView.indexPatternDoesNotMatchIndexNameErrorMessage"
|
||||
defaultMessage="Index pattern does not match index name"
|
||||
id="xpack.dataVisualizer.file.importView.indexPatternDoesNotMatchDataViewErrorMessage"
|
||||
defaultMessage="Data view does not match index name"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ interface Props {
|
|||
}
|
||||
|
||||
// Component for rendering a button which automatically sets the range of the time filter
|
||||
// to the time range of data in the index(es) mapped to the supplied Kibana index pattern or query.
|
||||
// to the time range of data in the index(es) mapped to the supplied Kibana data view or query.
|
||||
export const FullTimeRangeSelector: FC<Props> = ({
|
||||
timefilter,
|
||||
indexPattern,
|
||||
|
|
|
@ -157,7 +157,7 @@ export const IndexDataVisualizerView: FC<IndexDataVisualizerViewProps> = (dataVi
|
|||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
// When navigating away from the index pattern
|
||||
// When navigating away from the data view
|
||||
// Reset all previously set filters
|
||||
// to make sure new page doesn't have unrelated filters
|
||||
data.query.filterManager.removeAll();
|
||||
|
@ -206,10 +206,10 @@ export const IndexDataVisualizerView: FC<IndexDataVisualizerViewProps> = (dataVi
|
|||
if (!currentIndexPattern.isTimeBased()) {
|
||||
toasts.addWarning({
|
||||
title: i18n.translate(
|
||||
'xpack.dataVisualizer.index.indexPatternNotBasedOnTimeSeriesNotificationTitle',
|
||||
'xpack.dataVisualizer.index.dataViewNotBasedOnTimeSeriesNotificationTitle',
|
||||
{
|
||||
defaultMessage: 'The index pattern {indexPatternTitle} is not based on a time series',
|
||||
values: { indexPatternTitle: currentIndexPattern.title },
|
||||
defaultMessage: 'The data view {dataViewTitle} is not based on a time series',
|
||||
values: { dataViewTitle: currentIndexPattern.title },
|
||||
}
|
||||
),
|
||||
text: i18n.translate(
|
||||
|
@ -225,7 +225,7 @@ export const IndexDataVisualizerView: FC<IndexDataVisualizerViewProps> = (dataVi
|
|||
const indexPatternFields: IndexPatternField[] = currentIndexPattern.fields;
|
||||
|
||||
const fieldTypes = useMemo(() => {
|
||||
// Obtain the list of non metric field types which appear in the index pattern.
|
||||
// Obtain the list of non metric field types which appear in the data view.
|
||||
const indexedFieldTypes: JobFieldType[] = [];
|
||||
indexPatternFields.forEach((field) => {
|
||||
if (!OMIT_FIELDS.includes(field.name) && field.scripted !== true) {
|
||||
|
@ -275,7 +275,7 @@ export const IndexDataVisualizerView: FC<IndexDataVisualizerViewProps> = (dataVi
|
|||
filters: Filter[];
|
||||
}) => {
|
||||
// When the user loads saved search and then clear or modify the query
|
||||
// we should remove the saved search and replace it with the index pattern id
|
||||
// we should remove the saved search and replace it with the data view id
|
||||
if (currentSavedSearch !== null) {
|
||||
setCurrentSavedSearch(null);
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ export const IndexDataVisualizerView: FC<IndexDataVisualizerViewProps> = (dataVi
|
|||
});
|
||||
// Obtain the list of all non-metric fields which appear in documents
|
||||
// (aggregatable or not aggregatable).
|
||||
const populatedNonMetricFields: any[] = []; // Kibana index pattern non metric fields.
|
||||
const populatedNonMetricFields: any[] = []; // Kibana data view non metric fields.
|
||||
let nonMetricFieldData: any[] = []; // Basic non metric field data loaded from requesting overall stats.
|
||||
const aggregatableExistsFields: any[] = overallStats.aggregatableExistsFields || [];
|
||||
const nonAggregatableExistsFields: any[] = overallStats.nonAggregatableExistsFields || [];
|
||||
|
@ -743,7 +743,7 @@ export const IndexDataVisualizerView: FC<IndexDataVisualizerViewProps> = (dataVi
|
|||
deletable: field.runtimeField !== undefined,
|
||||
};
|
||||
|
||||
// Map the field type from the Kibana index pattern to the field type
|
||||
// Map the field type from the Kibana data view to the field type
|
||||
// used in the data visualizer.
|
||||
const dataVisualizerType = kbnTypeToJobType(field);
|
||||
if (dataVisualizerType !== undefined) {
|
||||
|
|
|
@ -14,7 +14,7 @@ import { dataVisualizerRefresh$, Refresh } from '../../services/timefilter_refre
|
|||
|
||||
export interface DataVisualizerIndexPatternManagementProps {
|
||||
/**
|
||||
* Currently selected index pattern
|
||||
* Currently selected data view
|
||||
*/
|
||||
currentIndexPattern?: IndexPattern;
|
||||
/**
|
||||
|
@ -79,9 +79,9 @@ export function DataVisualizerIndexPatternManagement(
|
|||
iconType="boxesHorizontal"
|
||||
data-test-subj="dataVisualizerIndexPatternManagementButton"
|
||||
aria-label={i18n.translate(
|
||||
'xpack.dataVisualizer.index.indexPatternManagement.actionsPopoverLabel',
|
||||
'xpack.dataVisualizer.index.dataViewManagement.actionsPopoverLabel',
|
||||
{
|
||||
defaultMessage: 'Index pattern settings',
|
||||
defaultMessage: 'Data view settings',
|
||||
}
|
||||
)}
|
||||
onClick={() => {
|
||||
|
@ -103,8 +103,8 @@ export function DataVisualizerIndexPatternManagement(
|
|||
addField();
|
||||
}}
|
||||
>
|
||||
{i18n.translate('xpack.dataVisualizer.index.indexPatternManagement.addFieldButton', {
|
||||
defaultMessage: 'Add field to index pattern',
|
||||
{i18n.translate('xpack.dataVisualizer.index.dataViewManagement.addFieldButton', {
|
||||
defaultMessage: 'Add field to data view',
|
||||
})}
|
||||
</EuiContextMenuItem>,
|
||||
<EuiContextMenuItem
|
||||
|
@ -118,8 +118,8 @@ export function DataVisualizerIndexPatternManagement(
|
|||
});
|
||||
}}
|
||||
>
|
||||
{i18n.translate('xpack.dataVisualizer.index.indexPatternManagement.manageFieldButton', {
|
||||
defaultMessage: 'Manage index pattern fields',
|
||||
{i18n.translate('xpack.dataVisualizer.index.dataViewManagement.manageFieldButton', {
|
||||
defaultMessage: 'Manage data view fields',
|
||||
})}
|
||||
</EuiContextMenuItem>,
|
||||
]}
|
||||
|
|
|
@ -77,8 +77,8 @@ export const DataVisualizerUrlStateContextProvider: FC<DataVisualizerUrlStateCon
|
|||
setCurrentIndexPattern(indexPattern);
|
||||
} catch (e) {
|
||||
toasts.addError(e, {
|
||||
title: i18n.translate('xpack.dataVisualizer.index.indexPatternErrorMessage', {
|
||||
defaultMessage: 'Error finding index pattern',
|
||||
title: i18n.translate('xpack.dataVisualizer.index.dataViewErrorMessage', {
|
||||
defaultMessage: 'Error finding data view',
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ describe('Index data visualizer locator', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should prioritize savedSearchId even when index pattern id is available', async () => {
|
||||
it('should prioritize savedSearchId even when data view id is available', async () => {
|
||||
const location = await definition.getLocation({
|
||||
indexPatternId: '3da93760-e0af-11ea-9ad3-3bcfc330e42a',
|
||||
savedSearchId: '45014020-dffa-11eb-b120-a105fbbe93b3',
|
||||
|
|
|
@ -18,7 +18,7 @@ import { IndexPattern } from '../../../../../../../src/plugins/data/common';
|
|||
import { fieldFormatsMock } from '../../../../../../../src/plugins/field_formats/common/mocks';
|
||||
import { uiSettingsServiceMock } from 'src/core/public/mocks';
|
||||
|
||||
// helper function to create index patterns
|
||||
// helper function to create data views
|
||||
function createMockDataView(id: string) {
|
||||
const {
|
||||
type,
|
||||
|
|
|
@ -41,7 +41,7 @@ export const checkAggregatableFieldsExist = async (
|
|||
// filter aggregation with exists query.
|
||||
const aggs: Aggs = datafeedAggregations !== undefined ? { ...datafeedAggregations } : {};
|
||||
|
||||
// Combine runtime fields from the index pattern as well as the datafeed
|
||||
// Combine runtime fields from the data view as well as the datafeed
|
||||
const combinedRuntimeMappings: estypes.MappingRuntimeFields = {
|
||||
...(isPopulatedObject(runtimeMappings) ? runtimeMappings : {}),
|
||||
...(isPopulatedObject(datafeedConfig) && isPopulatedObject(datafeedConfig.runtime_mappings)
|
||||
|
|
|
@ -40,7 +40,7 @@ export class DataVisualizer {
|
|||
this._client = client;
|
||||
}
|
||||
|
||||
// Obtains overall stats on the fields in the supplied index pattern, returning an object
|
||||
// Obtains overall stats on the fields in the supplied data view, returning an object
|
||||
// containing the total document count, and four arrays showing which of the supplied
|
||||
// aggregatable and non-aggregatable fields do or do not exist in documents.
|
||||
// Sampling will be used if supplied samplerShardSize > 0.
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
dataVisualizerFieldHistogramsSchema,
|
||||
dataVisualizerFieldStatsSchema,
|
||||
dataVisualizerOverallStatsSchema,
|
||||
indexPatternTitleSchema,
|
||||
dataViewTitleSchema,
|
||||
} from './schemas';
|
||||
import type { Field, StartDeps, HistogramField } from '../types';
|
||||
import { DataVisualizer } from '../models/data_visualizer';
|
||||
|
@ -97,33 +97,33 @@ export function dataVisualizerRoutes(coreSetup: CoreSetup<StartDeps, unknown>) {
|
|||
/**
|
||||
* @apiGroup DataVisualizer
|
||||
*
|
||||
* @api {post} /internal/data_visualizer/get_field_histograms/:indexPatternTitle Get histograms for fields
|
||||
* @api {post} /internal/data_visualizer/get_field_histograms/:dataViewTitle Get histograms for fields
|
||||
* @apiName GetHistogramsForFields
|
||||
* @apiDescription Returns the histograms on a list fields in the specified index pattern.
|
||||
* @apiDescription Returns the histograms on a list fields in the specified data view.
|
||||
*
|
||||
* @apiSchema (params) indexPatternTitleSchema
|
||||
* @apiSchema (params) dataViewTitleSchema
|
||||
* @apiSchema (body) dataVisualizerFieldHistogramsSchema
|
||||
*
|
||||
* @apiSuccess {Object} fieldName histograms by field, keyed on the name of the field.
|
||||
*/
|
||||
router.post(
|
||||
{
|
||||
path: '/internal/data_visualizer/get_field_histograms/{indexPatternTitle}',
|
||||
path: '/internal/data_visualizer/get_field_histograms/{dataViewTitle}',
|
||||
validate: {
|
||||
params: indexPatternTitleSchema,
|
||||
params: dataViewTitleSchema,
|
||||
body: dataVisualizerFieldHistogramsSchema,
|
||||
},
|
||||
},
|
||||
async (context, request, response) => {
|
||||
try {
|
||||
const {
|
||||
params: { indexPatternTitle },
|
||||
params: { dataViewTitle },
|
||||
body: { query, fields, samplerShardSize, runtimeMappings },
|
||||
} = request;
|
||||
|
||||
const results = await getHistogramsForFields(
|
||||
context.core.elasticsearch.client,
|
||||
indexPatternTitle,
|
||||
dataViewTitle,
|
||||
query,
|
||||
fields,
|
||||
samplerShardSize,
|
||||
|
@ -142,27 +142,27 @@ export function dataVisualizerRoutes(coreSetup: CoreSetup<StartDeps, unknown>) {
|
|||
/**
|
||||
* @apiGroup DataVisualizer
|
||||
*
|
||||
* @api {post} /internal/data_visualizer/get_field_stats/:indexPatternTitle Get stats for fields
|
||||
* @api {post} /internal/data_visualizer/get_field_stats/:dataViewTitle Get stats for fields
|
||||
* @apiName GetStatsForFields
|
||||
* @apiDescription Returns the stats on individual fields in the specified index pattern.
|
||||
* @apiDescription Returns the stats on individual fields in the specified data view.
|
||||
*
|
||||
* @apiSchema (params) indexPatternTitleSchema
|
||||
* @apiSchema (params) dataViewTitleSchema
|
||||
* @apiSchema (body) dataVisualizerFieldStatsSchema
|
||||
*
|
||||
* @apiSuccess {Object} fieldName stats by field, keyed on the name of the field.
|
||||
*/
|
||||
router.post(
|
||||
{
|
||||
path: '/internal/data_visualizer/get_field_stats/{indexPatternTitle}',
|
||||
path: '/internal/data_visualizer/get_field_stats/{dataViewTitle}',
|
||||
validate: {
|
||||
params: indexPatternTitleSchema,
|
||||
params: dataViewTitleSchema,
|
||||
body: dataVisualizerFieldStatsSchema,
|
||||
},
|
||||
},
|
||||
async (context, request, response) => {
|
||||
try {
|
||||
const {
|
||||
params: { indexPatternTitle },
|
||||
params: { dataViewTitle },
|
||||
body: {
|
||||
query,
|
||||
fields,
|
||||
|
@ -177,7 +177,7 @@ export function dataVisualizerRoutes(coreSetup: CoreSetup<StartDeps, unknown>) {
|
|||
} = request;
|
||||
const results = await getStatsForFields(
|
||||
context.core.elasticsearch.client,
|
||||
indexPatternTitle,
|
||||
dataViewTitle,
|
||||
query,
|
||||
fields,
|
||||
samplerShardSize,
|
||||
|
@ -201,11 +201,11 @@ export function dataVisualizerRoutes(coreSetup: CoreSetup<StartDeps, unknown>) {
|
|||
/**
|
||||
* @apiGroup DataVisualizer
|
||||
*
|
||||
* @api {post} /internal/data_visualizer/get_overall_stats/:indexPatternTitle Get overall stats
|
||||
* @api {post} /internal/data_visualizer/get_overall_stats/:dataViewTitle Get overall stats
|
||||
* @apiName GetOverallStats
|
||||
* @apiDescription Returns the top level overall stats for the specified index pattern.
|
||||
* @apiDescription Returns the top level overall stats for the specified data view.
|
||||
*
|
||||
* @apiSchema (params) indexPatternTitleSchema
|
||||
* @apiSchema (params) dataViewTitleSchema
|
||||
* @apiSchema (body) dataVisualizerOverallStatsSchema
|
||||
*
|
||||
* @apiSuccess {number} totalCount total count of documents.
|
||||
|
@ -216,16 +216,16 @@ export function dataVisualizerRoutes(coreSetup: CoreSetup<StartDeps, unknown>) {
|
|||
*/
|
||||
router.post(
|
||||
{
|
||||
path: '/internal/data_visualizer/get_overall_stats/{indexPatternTitle}',
|
||||
path: '/internal/data_visualizer/get_overall_stats/{dataViewTitle}',
|
||||
validate: {
|
||||
params: indexPatternTitleSchema,
|
||||
params: dataViewTitleSchema,
|
||||
body: dataVisualizerOverallStatsSchema,
|
||||
},
|
||||
},
|
||||
async (context, request, response) => {
|
||||
try {
|
||||
const {
|
||||
params: { indexPatternTitle },
|
||||
params: { dataViewTitle },
|
||||
body: {
|
||||
query,
|
||||
aggregatableFields,
|
||||
|
@ -240,7 +240,7 @@ export function dataVisualizerRoutes(coreSetup: CoreSetup<StartDeps, unknown>) {
|
|||
|
||||
const results = await getOverallStats(
|
||||
context.core.elasticsearch.client,
|
||||
indexPatternTitle,
|
||||
dataViewTitle,
|
||||
query,
|
||||
aggregatableFields,
|
||||
nonAggregatableFields,
|
||||
|
|
|
@ -20,9 +20,9 @@ export const runtimeMappingsSchema = schema.object(
|
|||
}
|
||||
);
|
||||
|
||||
export const indexPatternTitleSchema = schema.object({
|
||||
/** Title of the index pattern for which to return stats. */
|
||||
indexPatternTitle: schema.string(),
|
||||
export const dataViewTitleSchema = schema.object({
|
||||
/** Title of the data view for which to return stats. */
|
||||
dataViewTitle: schema.string(),
|
||||
});
|
||||
|
||||
export const dataVisualizerFieldHistogramsSchema = schema.object({
|
||||
|
|
|
@ -204,7 +204,7 @@ For ad-hoc diagnostic purposes, your go to tools are Discover and Lens. Your
|
|||
user will need to have access to the index, which is considered a Kibana
|
||||
system index due to it's prefix.
|
||||
|
||||
Add the event log index as an index pattern. The only customization needed is
|
||||
Add the event log index as a data view. The only customization needed is
|
||||
to set the `event.duration` field to a duration in nanoseconds. You'll
|
||||
probably want it displayed as milliseconds.
|
||||
|
||||
|
|
|
@ -368,8 +368,8 @@ export const buildOSSFeatures = ({
|
|||
},
|
||||
{
|
||||
id: 'indexPatterns',
|
||||
name: i18n.translate('xpack.features.indexPatternFeatureName', {
|
||||
defaultMessage: 'Index Pattern Management',
|
||||
name: i18n.translate('xpack.features.dataViewFeatureName', {
|
||||
defaultMessage: 'Data View Management',
|
||||
}),
|
||||
order: 1600,
|
||||
category: DEFAULT_APP_CATEGORIES.management,
|
||||
|
|
|
@ -210,7 +210,7 @@ export class ImportCompleteView extends Component<Props, {}> {
|
|||
{this._renderCodeEditor(
|
||||
this.props.indexPatternResp,
|
||||
i18n.translate('xpack.fileUpload.importComplete.indexPatternResponse', {
|
||||
defaultMessage: 'Index pattern response',
|
||||
defaultMessage: 'Data view response',
|
||||
}),
|
||||
'indexPatternRespCopyButton'
|
||||
)}
|
||||
|
|
|
@ -180,7 +180,7 @@ export class JsonUploadAndParse extends Component<FileUploadComponentProps, Stat
|
|||
this.setState({
|
||||
importResults,
|
||||
importStatus: i18n.translate('xpack.fileUpload.jsonUploadAndParse.creatingIndexPattern', {
|
||||
defaultMessage: 'Creating index pattern: {indexName}',
|
||||
defaultMessage: 'Creating data view: {indexName}',
|
||||
values: { indexName: this.state.indexName },
|
||||
}),
|
||||
});
|
||||
|
@ -194,7 +194,7 @@ export class JsonUploadAndParse extends Component<FileUploadComponentProps, Stat
|
|||
true
|
||||
);
|
||||
if (!indexPattern.id) {
|
||||
throw new Error('Index pattern id not provided');
|
||||
throw new Error('id not provided');
|
||||
}
|
||||
const geoField = indexPattern.fields.find((field) =>
|
||||
[ES_FIELD_TYPES.GEO_POINT as string, ES_FIELD_TYPES.GEO_SHAPE as string].includes(
|
||||
|
@ -202,7 +202,7 @@ export class JsonUploadAndParse extends Component<FileUploadComponentProps, Stat
|
|||
)
|
||||
);
|
||||
if (!geoField) {
|
||||
throw new Error('geo field not created in index pattern');
|
||||
throw new Error('geo field not created');
|
||||
}
|
||||
results = {
|
||||
indexPatternId: indexPattern.id,
|
||||
|
@ -214,7 +214,7 @@ export class JsonUploadAndParse extends Component<FileUploadComponentProps, Stat
|
|||
if (this._isMounted) {
|
||||
this.setState({
|
||||
importStatus: i18n.translate('xpack.fileUpload.jsonUploadAndParse.indexPatternError', {
|
||||
defaultMessage: 'Index pattern error',
|
||||
defaultMessage: 'Unable to create data view',
|
||||
}),
|
||||
phase: PHASE.COMPLETE,
|
||||
});
|
||||
|
|
|
@ -38,7 +38,7 @@ export const validateIndexName = async (indexName: string) => {
|
|||
const indexPatternNames = await getIndexPatternService().getTitles();
|
||||
if (indexPatternNames.includes(indexName)) {
|
||||
return i18n.translate('xpack.fileUpload.indexPatternAlreadyExistsErrorMessage', {
|
||||
defaultMessage: 'Index pattern already exists.',
|
||||
defaultMessage: 'Data view already exists.',
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -174,13 +174,13 @@ function GuidancePanelComponent(props: GuidancePanelProps) {
|
|||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.graph.noDataSourceNotificationMessageText"
|
||||
defaultMessage="No data sources found. Go to {managementIndexPatternsLink} and create an index pattern for your Elasticsearch indices."
|
||||
defaultMessage="No data sources found. Go to {managementIndexPatternsLink} and create a data view for your Elasticsearch indices."
|
||||
values={{
|
||||
managementIndexPatternsLink: (
|
||||
<a href={indexPatternUrl}>
|
||||
<FormattedMessage
|
||||
id="xpack.graph.noDataSourceNotificationMessageText.managementIndexPatternLinkText"
|
||||
defaultMessage="Management > Index Patterns"
|
||||
id="xpack.graph.noDataSourceNotificationMessageText.managementDataViewLinkText"
|
||||
defaultMessage="Management > Data views"
|
||||
/>
|
||||
</a>
|
||||
),
|
||||
|
|
|
@ -40,8 +40,8 @@ export function SourcePicker({
|
|||
{
|
||||
type: 'index-pattern',
|
||||
getIconForSavedObject: () => 'indexPatternApp',
|
||||
name: i18n.translate('xpack.graph.sourceModal.savedObjectType.indexPattern', {
|
||||
defaultMessage: 'Index pattern',
|
||||
name: i18n.translate('xpack.graph.sourceModal.savedObjectType.dataView', {
|
||||
defaultMessage: 'Data view',
|
||||
}),
|
||||
showSavedObject: (indexPattern) => !indexPattern.attributes.type,
|
||||
includeFields: ['type'],
|
||||
|
|
|
@ -44,8 +44,8 @@ export const datasourceSaga = ({
|
|||
// in case of errors, reset the datasource and show notification
|
||||
yield put(setDatasource({ type: 'none' }));
|
||||
notifications.toasts.addDanger(
|
||||
i18n.translate('xpack.graph.loadWorkspace.missingIndexPatternErrorMessage', {
|
||||
defaultMessage: 'Index pattern "{name}" not found',
|
||||
i18n.translate('xpack.graph.loadWorkspace.missingDataViewErrorMessage', {
|
||||
defaultMessage: 'Data view "{name}" not found',
|
||||
values: {
|
||||
name: action.payload.title,
|
||||
},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue