Skip to content

[7.6] Define URLs for tile and file APIs#13

Merged
nickpeihl merged 11 commits intoelastic:masterfrom
nickpeihl:7.6/api-urls
Jan 13, 2020
Merged

[7.6] Define URLs for tile and file APIs#13
nickpeihl merged 11 commits intoelastic:masterfrom
nickpeihl:7.6/api-urls

Conversation

@nickpeihl
Copy link
Copy Markdown
Contributor

@nickpeihl nickpeihl commented Nov 20, 2019

Depends on elastic/ems-file-service#143

This updates ems-client to work with the changes in EMS v7.6. The EMS v7.6 API will no longer have a catalogue manifest and URLs in the tile and vector manifests will be changed from absolute to relative. See elastic/ems-file-service#143

ems-client@7.6 now accepts two new parameters (tileApiUrl and fileApiUrl) which are expected to be the basepath for the API (e.g. https://tiles.maps.elastic.co and https://files.maps.elastic.co).

Since the basepath for each API is configurable, we should no longer need the proxyPath parameter. The URLs to the proxy services with the required endpoints are all that is needed.

Copy link
Copy Markdown
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments, thanks!

import { format as formatUrl, parse as parseUrl } from 'url';

// TODO should we parse this from package.json?
const EMS_VERSION = '7.6';
Copy link
Copy Markdown
Contributor

@thomasneirynck thomasneirynck Jan 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can leave this as-is for now, but we should add this to readme that this needs to get updated if we publish a new version.

I would also rename to DEFAULT_EMS_VERSION.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add this to readme that this needs to get updated if we publish a new version.

Good idea. I'll add it to this PR for CONTRIBUTING.md.

src/utils.js Outdated

/**
* Resolves a target URL path relative to the host.
* This is specifically usefed by the Kibana proxy re-routing.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usefeeding sounds like agro-industrial jargon.

@thomasneirynck
Copy link
Copy Markdown
Contributor

Feel free to publish to npm. If we need to revisit, we can always publish patch. Thanks!

@nickpeihl nickpeihl merged commit 7ceb2bd into elastic:master Jan 13, 2020
@nickpeihl nickpeihl mentioned this pull request Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants