Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maps] Duplicated EMS instructions for Elastic Cloud #103124

Merged
merged 1 commit into from
Jun 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 44 additions & 41 deletions x-pack/plugins/maps/server/tutorials/ems/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand All @@ -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,
});
}