-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin #64123
Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin #64123
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall, +1 on approach, thanks!
I think we're regression again on the license-issue wrt OSS visualizations.
If basic+ is installed, coordinate and region should zoom to larger zoom. It is no longer doing this. It seems like service-settings aren't correctly updated?
e.g. the manifests-call to EMS no longer include the license-key: https://tiles.maps.elastic.co/v7.8/manifest?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=
e.g Coordinate Maps:
The behavior in region-maps is slightly different. Here, the map can zoom beyond level 10, but we're not showing tiles.
It seems minZoom
and maxZoom
are undefined here:
kibana/src/plugins/maps_legacy/public/map/kibana_map.js
Lines 122 to 123 in 912c31c
minZoom: options.minZoom, | |
maxZoom: options.maxZoom, |
|
||
export function getBaseMapsVis(core: CoreSetup) { | ||
const getKibanaMap = getKibanaMapFactoryProvider(core); | ||
const serviceSettings = new ServiceSettings(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to make sure the serviceSettings get correctly initialized with min/max zoom/license?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good feedback! We were definitely missing the license here. Since it was a new/different instance of ServiceSettings
, maps_legacy_licensing
never injected the license in. I've defaulted instead to all plugins working with the same ServiceSettings
instance as it was before.
I haven't modified how min/max zoom are set in this PR but that could be related to the above issue you mentioned where tiles aren't appearing past zoom level 10. This issue also exists on master and should be tackled as part of a separate fix. I've captured it here: #64573
4f988a9
to
bddea49
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
…n new maps_legacy plugin (elastic#64123)
* master: (60 commits) [SIEM] Create template timeline (elastic#63136) load react component lazily in so management section (elastic#64285) Cleanup .eslingignore and add target (elastic#64617) [Ingest] Support yaml variables in datasource (elastic#64459) typescript-ify portions of src/optimize (elastic#64688) [ngSanitize] add explicit dependencies to all uses of `ngSanitize` angular module (elastic#64546) Consolidate downloading plugin bundles to bootstrap script (elastic#64685) [Maps] disable edit layer button when flyout is open for add layer or map settings (elastic#64230) chore(NA): add async import into infra plugin to reduce apm bundle size (elastic#63292) [Maps] fix edit filter (elastic#64586) [SIEM][Detections] Adds large list support using REST endpoints Replace a number of any-ed styled(eui*) with accurate types (elastic#64555) [Endpoint] Recursive resolver children (elastic#61914) [ML] Fix new job wizard with multiple indices (elastic#64567) Use short URLs for legacy plugin deprecation warning (elastic#64540) [Uptime] Update uptime ml job id to limit to 64 char (elastic#64394) [Ingest] Fix GET /enrollment-api-keys/null error (elastic#64595) Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin (elastic#64123) ES UI new platform cleanup (elastic#64332) [Event Log] use @timestamp field for queries (elastic#64391) ...
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Region, coordinate and to some degree Vega Maps have dependencies between each other. This inhibits moving each plugin to NP. This PR consolidates cross-cutting concerns in the new maps_legacy plugin making it easier to move these plugin to NP. This makes more sense now whereas it didn't in the past since there was no common plugin where these shared pieces might live. The following changes were made:
BaseMapsVisualization
moved tomaps_legacy
KibanaMap
to reduce code and passing dependencies (such as the Kibana Toast Service) around needlesslymaps_legacy
. We can re-evaluate if some of these should live in the region and coordinate maps once they're moved over, but for now we need to consolidate them and not be pulling them in from other legacy pluginsmaps_legacy
maps_legacy
$injector
dependency and shims from from both legacy maps