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] Add missing license to requests in maps embeddables #59207

Merged

Conversation

kindsun
Copy link
Contributor

@kindsun kindsun commented Mar 3, 2020

Summary

Resolves #59014. The Maps embeddable (used in dashboard) follows a different plugin initialization path from the normal Maps app. As of the introduction of NP licensing in #52641, the license wasn't properly injected for use in embeddable map tile requests. This PR pulls that initialization step out into a separate function that can be leveraged by both the Maps App and Maps Embeddable instances. This function will also be a useful pattern to follow while Maps is in Legacy for initialization of further NP services that embeddables relies on as we transition its dependencies.

Screenshot of Maps embedddable in dashboard with this logic in place:

image

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@kindsun kindsun marked this pull request as ready for review March 3, 2020 22:38
@kindsun kindsun requested a review from a team as a code owner March 3, 2020 22:38
@kindsun kindsun requested review from nreese and thomasneirynck March 3, 2020 22:38
@kindsun
Copy link
Contributor Author

kindsun commented Mar 3, 2020

It's currently difficult to test in the client whether or not Maps requests include a valid license as injected in the plugin. These tests could (should) be added as part of this related issue: #59243

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

Thanks for putting a PR together so quickly.

When running this branch, I saw the following server log messages that I have never seen before. Are you seeing this in your environment?

Screen Shot 2020-03-04 at 7 19 27 AM

Update:

Looks like these error messages are on master branch as well and not part of this PR

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm with green CI
code review and tested in chrome

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kindsun kindsun merged commit 76e3f82 into elastic:master Mar 4, 2020
kindsun pushed a commit to kindsun/kibana that referenced this pull request Mar 4, 2020
…9207)

* Pull core service init out into separate function

* Call bind function from embeddable factory constructor

* Move inspector init back to start method. Remove old license check file

* Add TS types
kindsun pushed a commit to kindsun/kibana that referenced this pull request Mar 4, 2020
…9207)

* Pull core service init out into separate function

* Call bind function from embeddable factory constructor

* Move inspector init back to start method. Remove old license check file

* Add TS types
kindsun pushed a commit that referenced this pull request Mar 4, 2020
…59334)

* Pull core service init out into separate function

* Call bind function from embeddable factory constructor

* Move inspector init back to start method. Remove old license check file

* Add TS types
kindsun pushed a commit that referenced this pull request Mar 4, 2020
) (#59336)

* [Maps] Add missing license to requests in maps embeddables (#59207)

* Pull core service init out into separate function

* Call bind function from embeddable factory constructor

* Move inspector init back to start method. Remove old license check file

* Add TS types

* Fix remaining merge issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map Details Differ in Dashboard vs Visualization
5 participants