Skip to content

Commit

Permalink
update file_upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Aug 31, 2021
1 parent ec77737 commit 691e871
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}),
});
Expand All @@ -194,15 +194,15 @@ 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(
field.type
)
);
if (!geoField) {
throw new Error('geo field not created in index pattern');
throw new Error('geo field not created');
}
results = {
indexPatternId: indexPattern.id,
Expand All @@ -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,
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/file_upload/public/validate_index_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
});
}

Expand Down

0 comments on commit 691e871

Please sign in to comment.