Skip to content

Commit

Permalink
fix ems hotlink (elastic#26868) (elastic#26927)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck authored Dec 10, 2018
1 parent dd8e16a commit 8e3f22d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/ui/public/vis/__tests__/map/service_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

});

});
});
2 changes: 1 addition & 1 deletion src/ui/public/vis/map/service_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ uiModules.get('kibana')
}
}

async getEMSHotLink(fileLayer) {
getEMSHotLink(fileLayer) {
const id = `file/${fileLayer.name}`;
return `${mapConfig.emsLandingPageUrl}#${id}`;
}
Expand Down

0 comments on commit 8e3f22d

Please sign in to comment.