[Maps] Duplicated EMS instructions for Elastic Cloud (#103124)

This commit is contained in:
Jorge Sanz 2021-06-23 21:12:05 +02:00 committed by GitHub
parent eb7e0fa5f1
commit 1813d70b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,48 @@ export function emsBoundariesSpecProvider({
emsLandingPageUrl: string;
prependBasePath: (path: string) => string;
}) {
const instructions = {
instructionSets: [
{
instructionVariants: [
{
id: 'EMS',
instructions: [
{
title: i18n.translate('xpack.maps.tutorials.ems.downloadStepTitle', {
defaultMessage: 'Download Elastic Maps Service boundaries',
}),
textPre: i18n.translate('xpack.maps.tutorials.ems.downloadStepText', {
defaultMessage:
'1. Navigate to Elastic Maps Service [landing page]({emsLandingPageUrl}/).\n\
2. In the left sidebar, select an administrative boundary.\n\
3. Click `Download GeoJSON` button.',
values: {
emsLandingPageUrl,
},
}),
},
{
title: i18n.translate('xpack.maps.tutorials.ems.uploadStepTitle', {
defaultMessage: 'Index Elastic Maps Service boundaries',
}),
textPre: i18n.translate('xpack.maps.tutorials.ems.uploadStepText', {
defaultMessage:
'1. Open [Maps]({newMapUrl}).\n\
2. Click `Add layer`, then select `Upload GeoJSON`.\n\
3. Upload the GeoJSON file and click `Import file`.',
values: {
newMapUrl: prependBasePath(getNewMapPath()),
},
}),
},
],
},
],
},
],
};
return () => ({
id: 'emsBoundaries',
name: i18n.translate('xpack.maps.tutorials.ems.nameTitle', {
@ -34,46 +76,7 @@ Indexing EMS administrative boundaries in Elasticsearch allows for search on bou
euiIconType: 'emsApp',
completionTimeMinutes: 1,
previewImagePath: '/plugins/maps/assets/boundaries_screenshot.png',
onPrem: {
instructionSets: [
{
instructionVariants: [
{
id: 'EMS',
instructions: [
{
title: i18n.translate('xpack.maps.tutorials.ems.downloadStepTitle', {
defaultMessage: 'Download Elastic Maps Service boundaries',
}),
textPre: i18n.translate('xpack.maps.tutorials.ems.downloadStepText', {
defaultMessage:
'1. Navigate to Elastic Maps Service [landing page]({emsLandingPageUrl}).\n\
2. In the left sidebar, select an administrative boundary.\n\
3. Click `Download GeoJSON` button.',
values: {
emsLandingPageUrl,
},
}),
},
{
title: i18n.translate('xpack.maps.tutorials.ems.uploadStepTitle', {
defaultMessage: 'Index Elastic Maps Service boundaries',
}),
textPre: i18n.translate('xpack.maps.tutorials.ems.uploadStepText', {
defaultMessage:
'1. Open [Maps]({newMapUrl}).\n\
2. Click `Add layer`, then select `Upload GeoJSON`.\n\
3. Upload the GeoJSON file and click `Import file`.',
values: {
newMapUrl: prependBasePath(getNewMapPath()),
},
}),
},
],
},
],
},
],
},
onPrem: instructions,
elasticCloud: instructions,
});
}