From 772383afaaa5a69b593ffc51c3f65ca576c3bc07 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Mon, 10 Dec 2018 01:46:46 -0500 Subject: [PATCH] fix ems hotlink --- src/ui/public/vis/__tests__/map/service_settings.js | 8 ++++++++ src/ui/public/vis/map/service_settings.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ui/public/vis/__tests__/map/service_settings.js b/src/ui/public/vis/__tests__/map/service_settings.js index a32b75f268902..70c5602f049db 100644 --- a/src/ui/public/vis/__tests__/map/service_settings.js +++ b/src/ui/public/vis/__tests__/map/service_settings.js @@ -321,5 +321,13 @@ describe('service_settings (FKA tilemaptest)', function () { expect(fileLayers).to.eql(expected); }); + it ('should get hotlink', async () => { + mapConfig.emsLandingPageUrl = 'https://foo/bar'; + const fileLayers = await serviceSettings.getFileLayers(); + const hotlink = serviceSettings.getEMSHotLink(fileLayers[0]); + expect(hotlink).to.eql('https://foo/bar#file/US States'); + + }); + }); }); diff --git a/src/ui/public/vis/map/service_settings.js b/src/ui/public/vis/map/service_settings.js index 3b0c2d9302ae2..532e5e210c1bd 100644 --- a/src/ui/public/vis/map/service_settings.js +++ b/src/ui/public/vis/map/service_settings.js @@ -200,7 +200,7 @@ uiModules.get('kibana') } } - async getEMSHotLink(fileLayer) { + getEMSHotLink(fileLayer) { const id = `file/${fileLayer.name}`; return `${mapConfig.emsLandingPageUrl}#${id}`; }