[Maps] Create drawing layer copy updates (#103791)
* [Maps] Create drawing layer copy updates * tslint
This commit is contained in:
parent
5bb9691b55
commit
2f457da640
|
@ -18,12 +18,11 @@ const ADD_VECTOR_DRAWING_LAYER = 'ADD_VECTOR_DRAWING_LAYER';
|
|||
export const newVectorLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH],
|
||||
description: i18n.translate('xpack.maps.newVectorLayerWizard.description', {
|
||||
defaultMessage:
|
||||
'Create an empty layer. Use this to create documents by drawing shapes on the map',
|
||||
defaultMessage: 'Draw shapes on the map and index in Elasticsearch',
|
||||
}),
|
||||
disabledReason: i18n.translate('xpack.maps.newVectorLayerWizard.disabledDesc', {
|
||||
defaultMessage:
|
||||
'Unable to draw vector shapes, you are missing the Kibana privilege "Index Pattern Management".',
|
||||
'Unable to create index, you are missing the Kibana privilege "Index Pattern Management".',
|
||||
}),
|
||||
getIsDisabled: async () => {
|
||||
const hasImportPermission = await getFileUpload().hasImportPermission({
|
||||
|
@ -38,7 +37,7 @@ export const newVectorLayerWizardConfig: LayerWizard = {
|
|||
{
|
||||
id: ADD_VECTOR_DRAWING_LAYER,
|
||||
label: i18n.translate('xpack.maps.newVectorLayerWizard.indexNewLayer', {
|
||||
defaultMessage: 'Index new layer',
|
||||
defaultMessage: 'Create index',
|
||||
}),
|
||||
},
|
||||
],
|
||||
|
@ -47,6 +46,6 @@ export const newVectorLayerWizardConfig: LayerWizard = {
|
|||
},
|
||||
showFeatureEditTools: true,
|
||||
title: i18n.translate('xpack.maps.newVectorLayerWizard.title', {
|
||||
defaultMessage: 'Create new layer',
|
||||
defaultMessage: 'Create index',
|
||||
}),
|
||||
};
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { EuiEmptyPrompt, EuiPanel, EuiCallOut } from '@elastic/eui';
|
||||
import React, { Component } from 'react';
|
||||
import { EuiPanel, EuiCallOut } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { createNewIndexAndPattern } from './create_new_index_pattern';
|
||||
import { RenderWizardArguments } from '../layer_wizard_registry';
|
||||
|
@ -125,36 +125,13 @@ export class NewVectorLayerEditor extends Component<RenderWizardArguments, State
|
|||
const IndexNameForm = getIndexNameFormComponent();
|
||||
return (
|
||||
<EuiPanel>
|
||||
<>
|
||||
<EuiEmptyPrompt
|
||||
title={
|
||||
<h4>
|
||||
{i18n.translate('xpack.maps.layers.newVectorLayerWizard.createNewLayer', {
|
||||
defaultMessage: 'Create new layer',
|
||||
})}
|
||||
</h4>
|
||||
}
|
||||
body={
|
||||
<Fragment>
|
||||
<p>
|
||||
{i18n.translate(
|
||||
'xpack.maps.layers.newVectorLayerWizard.vectorEditorDescription',
|
||||
{
|
||||
defaultMessage: `Creates a new vector layer. This can be used to draw and store new shapes.`,
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
</Fragment>
|
||||
}
|
||||
/>
|
||||
<IndexNameForm
|
||||
indexName={this.state.indexName}
|
||||
indexNameError={this.state.indexNameError}
|
||||
onIndexNameChange={this._onIndexChange}
|
||||
onIndexNameValidationStart={() => {}}
|
||||
onIndexNameValidationEnd={() => {}}
|
||||
/>
|
||||
</>
|
||||
<IndexNameForm
|
||||
indexName={this.state.indexName}
|
||||
indexNameError={this.state.indexNameError}
|
||||
onIndexNameChange={this._onIndexChange}
|
||||
onIndexNameValidationStart={() => {}}
|
||||
onIndexNameValidationEnd={() => {}}
|
||||
/>
|
||||
</EuiPanel>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue