[maps] fix layers are not displayed in offline environment and map.includeElasticMapsService not set to false#152396
Conversation
…cludeElasticMapsService not set to false
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
nickpeihl
left a comment
There was a problem hiding this comment.
lgtm! just one nit.
thanks for the fix! code review and tested by blocking access to tiles.elastic.co/*
| // eslint-disable-next-line no-console | ||
| console.warn( | ||
| `Unable to access fonts from Elastic Maps Service (EMS). Set kibana.yml 'map.includeElasticMapsService: false' to avoid unnecessary EMS requests.` | ||
| ); |
There was a problem hiding this comment.
Nit. This warning will only be visible in the browser console of a client which might not be the best audience. Since we're suggesting changing kibana.yml, maybe we should instead log this warning in the kibana log where an administrator might see it?
There was a problem hiding this comment.
Do you know if its possible to write kibana logs from the client?
There was a problem hiding this comment.
oh right. nevermind. also, after more consideration, I realize this is definitely more related to the client's environment as they might not have external internet access, but other clients accessing the kibana cluster may have access. so the warning would probably not be very useful for admins.
…l/apps/dashboard/group2/dashboard_maps_by_value·ts (#152850) Fixes #152476 flaky test runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1995 #152396 added an await to map loading that waits for EMS fonts HEAD request. This introduced test flakiness. This PR resolves the issue by re-working the solution from #152476 to not block map loading for EMS fonts HEAD request. Instead, glyphs URL is updated if EMS fonts HEAD request fails after map has loaded. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…cludeElasticMapsService not set to false (elastic#152396) Fixes elastic#152389 PR adds check to ensure client has access to EMS before using EMS fonts. If the client does not have access to EMS fonts then a warning is logged and map falls back to open sans fonts served from Kibana server.
…l/apps/dashboard/group2/dashboard_maps_by_value·ts (elastic#152850) Fixes elastic#152476 flaky test runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1995 elastic#152396 added an await to map loading that waits for EMS fonts HEAD request. This introduced test flakiness. This PR resolves the issue by re-working the solution from elastic#152476 to not block map loading for EMS fonts HEAD request. Instead, glyphs URL is updated if EMS fonts HEAD request fails after map has loaded. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Fixes #152389
PR adds check to ensure client has access to EMS before using EMS fonts. If the client does not have access to EMS fonts then a warning is logged and map falls back to open sans fonts served from Kibana server.