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] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source #103373

Merged
merged 7 commits into from
Jun 28, 2021

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jun 24, 2021

Part of #97532

This PR:

  1. Registers deprecation messages for 'map.regionmap' kibana config with upgrade assistant.
  2. Removes "Configured GeoJSON" layer wizard
  3. Updates "Configured GeoJSON" layers to show "alert" icon with tooltip explaining how to resolve alert.

Screen Shot 2021-06-25 at 6 14 00 AM

Screen Shot 2021-06-24 at 4 40 43 PM

To test:

  1. add the following to your kibana.dev.yml
xpack.upgrade_assistant.readonly: false

map.regionmap:
 layers:
  - attribution: "EMS"
    name: "My copy of world countries"
    url: "https://vector.maps.elastic.co/files/world_countries_v7.geo.json?elastic_tile_service_tos=agree&my_app_name=ems-landing-page&my_app_version=7.10.0&license=643c1faf-80fc-4ab0-9323-4d9bd11f4bbc"
    fields:
     - name: "name"
       description: "Name"
     - name: "iso2"
       description: "iso2"
  1. Import map saved object with configured geojson layer
{"attributes":{"description":"","layerListJSON":"[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"isAutoSelect\":true},\"id\":\"85be2442-49e4-4a66-a6d0-81c0fc22c26a\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":1,\"visible\":true,\"style\":{\"type\":\"TILE\"},\"includeInFitToBounds\":true,\"type\":\"VECTOR_TILE\"},{\"sourceDescriptor\":{\"type\":\"REGIONMAP_FILE\",\"name\":\"My copy of world countries\"},\"id\":\"5d766667-52b9-4984-a33e-38d19308498d\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}},\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#54B399\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#41937c\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":6}},\"iconOrientation\":{\"type\":\"STATIC\",\"options\":{\"orientation\":0}},\"labelText\":{\"type\":\"STATIC\",\"options\":{\"value\":\"\"}},\"labelColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#000000\"}},\"labelSize\":{\"type\":\"STATIC\",\"options\":{\"size\":14}},\"labelBorderColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"labelBorderSize\":{\"options\":{\"size\":\"SMALL\"}}},\"isTimeAware\":true},\"includeInFitToBounds\":true,\"type\":\"VECTOR\",\"joins\":[]}]","mapStateJSON":"{\"zoom\":2.01,\"center\":{\"lon\":0,\"lat\":19.94277},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"settings\":{\"autoFitToDataBounds\":false,\"backgroundColor\":\"#ffffff\",\"disableInteractive\":false,\"disableTooltipControl\":false,\"hideToolbarOverlay\":false,\"hideLayerControl\":false,\"hideViewControl\":false,\"initialLocation\":\"LAST_SAVED_LOCATION\",\"fixedLocation\":{\"lat\":0,\"lon\":0,\"zoom\":2},\"browserLocation\":{\"zoom\":2},\"maxZoom\":24,\"minZoom\":0,\"showScaleControl\":false,\"showSpatialFilters\":true,\"showTimesliderToggleButton\":true,\"spatialFiltersAlpa\":0.3,\"spatialFiltersFillColor\":\"#DA8B45\",\"spatialFiltersLineColor\":\"#DA8B45\"}}","title":"map with configured geojson layer","uiStateJSON":"{\"isLayerTOCOpen\":true,\"openTOCDetails\":[]}"},"coreMigrationVersion":"8.0.0","id":"20111bb0-d5ae-11eb-a404-b351e49a7649","migrationVersion":{"map":"7.14.0"},"references":[],"type":"map","updated_at":"2021-06-25T12:09:10.782Z","version":"WzI0LDFd"}
{"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}
  1. Open imported map saved object. Notice the layer no longer displays data and has an alert icon in the TOC.
  2. Open upgrade assistant. Notice there is a critical warning for removing map.regionmap

@nreese nreese added release_note:deprecation [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.14.0 labels Jun 24, 2021
@nreese nreese requested a review from thomasneirynck June 24, 2021 23:01
@elasticmachine
Copy link
Contributor

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

@nreese
Copy link
Contributor Author

nreese commented Jun 28, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 742 741 -1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
maps 201 200 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
maps 3.1MB 3.1MB -1.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
maps 64.8KB 64.6KB -218.0B
Unknown metric groups

API count

id before after diff
maps 202 201 -1

History

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

Copy link
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.

thank you!

+1 on removing the add-layer-card altogether. cc @kmartastic - this PR removes the ability for users to create new layers from a json-file configured in the kibana.yml (existing maps continue to work though).

@@ -117,41 +101,3 @@ export function getGlyphUrl(): string {
export function isRetina(): boolean {
return window.devicePixelRatio === 2;
}

export async function fetchGeoJson(
Copy link
Contributor

Choose a reason for hiding this comment

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

thx for moving. This logic was pushed into ems-client, so there was no re-use anymore between kibana_regionmap_source and ems_layer_source

icon: isDeprecated ? (
<EuiIcon type="alert" color="danger" />
) : (
this.getCurrentStyle().getIcon()
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a nice touch.

@nreese nreese added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 28, 2021
@nreese nreese merged commit bf6be21 into elastic:master Jun 28, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 28, 2021
…N' source (elastic#103373)

* [Maps] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source

* clean up message

* revert change to KibanaRegionmapSource.getGeoJsonWithMeta

* tslint

* doc updates

* clean up

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 29, 2021
…N' source (#103373) (#103576)

* [Maps] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source

* clean up message

* revert change to KibanaRegionmapSource.getGeoJsonWithMeta

* tslint

* doc updates

* clean up

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Nathan Reese <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:deprecation v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants