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] update LayerWizard previewLayer to take layerDescriptor instead of ISource #64461

Merged
merged 15 commits into from
Apr 27, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Apr 24, 2020

This PR updates previewLayer method to receive layerDescriptor instead of an ISource instance. The existing implementation limits the layers that can be created via layer wizards. For example, some of the proposed observability solution layers are choropleth layers. Choropleth layers require join definitions. joins exist in the layer descriptor and do not exist in the source context. In order to create choropleth maps from layer wizard, previewLayer must receive a layerDescriptor.

This PR also cleans up some cruft in AddLayerPanel component.

@nreese nreese added WIP Work in progress [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.8.0 labels Apr 24, 2020
@nreese nreese requested a review from a team as a code owner April 24, 2020 21:20
@elasticmachine
Copy link
Contributor

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

<Fragment>
{isIndexingTriggered ? null : (
<Fragment>
<EuiButtonEmpty size="xs" flush="left" onClick={clearSource} iconType="arrowLeft">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This button was duplicated in two places. Moved to single location.

@@ -1,40 +0,0 @@
/*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Inlined component in AddLayerPanel. After removing duplicated button, the component is really small and does not need its own definition.

@nreese
Copy link
Contributor Author

nreese commented Apr 27, 2020

@elasticmachine merge upstream

@thomasneirynck thomasneirynck self-requested a review April 27, 2020 03:56
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.

thanks. +1 on the approach.

This is tough to review, since massive copy paste with the API tweaks, but I tested all sources and works.

Minor additional cleanup comments.

One thing is that the new API for the layer-registry is considerably more complex than before (mosty because it now accomodates the hooks for the file-upload), which makes me wonder if there are ways we can simplify this. Not necessary to address now, but imho necessary if we want to expose for external pluggability.


export type RenderWizardArguments = {
onPreviewSource: PreviewSourceHandler;
inspectorAdapters: object;
Copy link
Contributor

Choose a reason for hiding this comment

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

ok just transferring this API to here. but this looks complex and probably takes us further from #60918, especially when thinking of improving plugability.

(but can investigate how we can simplify later).

@nreese nreese requested a review from thomasneirynck April 27, 2020 11:28
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@nreese
Copy link
Contributor Author

nreese commented Apr 27, 2020

One thing is that the new API for the layer-registry is considerably more complex than before (mosty because it now accomodates the hooks for the file-upload), which makes me wonder if there are ways we can simplify this. Not necessary to address now, but imho necessary if we want to expose for external pluggability.

The API always had the hooks for file-upload, this PR just added them to the definition so the API was properly documented.

@nreese nreese merged commit 399df75 into elastic:master Apr 27, 2020
nreese added a commit to nreese/kibana that referenced this pull request Apr 27, 2020
…d of ISource (elastic#64461)

* more changes

* remove unused state argument

* revert change to make diff easier to follow

* migrate pew pew source to new previewLayer

* remove createDefaultLayer from ISource

* migrate EMS boundaries layer wizard

* convert ems tms layer wizard to previewLayer

* convert kibana base map to preview layer

* convert all other sources to previewLayer

* tslint clean-up

* remaining ts lint errors

* i18n clean up

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 27, 2020
* master:
  [Maps] update LayerWizard previewLayer to take layerDescriptor instead of ISource (elastic#64461)
nreese added a commit that referenced this pull request Apr 27, 2020
…d of ISource (#64461) (#64523)

* more changes

* remove unused state argument

* revert change to make diff easier to follow

* migrate pew pew source to new previewLayer

* remove createDefaultLayer from ISource

* migrate EMS boundaries layer wizard

* convert ems tms layer wizard to previewLayer

* convert kibana base map to preview layer

* convert all other sources to previewLayer

* tslint clean-up

* remaining ts lint errors

* i18n clean up

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 28, 2020
…bana into pipeline-editor-part-mvp-2

* 'feature/ingest-node-pipelines' of github.com:elastic/kibana: (152 commits)
  [Ingest pipelines] Simulate pipeline (elastic#64223)
  Ability to get scoped call cluster from alerting and action executors (elastic#64432)
  Add editApp and editPath to embeddable (elastic#64297)
  TSVB validation: Allow numeric values for axes (elastic#63553)
  [ML] Fixing optional plugin dependency types (elastic#64450)
  [Logs UI] Alerting (elastic#62806)
  [Endpoint] Show Policy Status on Host Details using Policy Response API (elastic#64116)
  [Maps] update LayerWizard previewLayer to take layerDescriptor instead of ISource (elastic#64461)
  Remove SO root property index signature (elastic#64434)
  [ML] Functional tests - stabilize job row details validations (elastic#64503)
  [Ingest] Add Global settings flyout (elastic#64276)
  Bump cypress dev-dependency from 4.2.0 to 4.4.1 (elastic#64408)
  Migrate saved object of type url to kibana platform (elastic#64043)
  [NP] Migrate ui capabilities (elastic#64185)
  Bump karma-mocha dev-dependency from 1.3.0 to 2.0.0 (elastic#64407)
  Migrate kql_telemetry saved object registration to Kibana platform (elastic#64149)
  Remove SO autocreateindex error and error page (elastic#64037)
  Fix issue with yarn.lock (elastic#64496)
  Bump @hapi/boom dependency from 7.4.2 to 7.4.11 (elastic#64433)
  Bump gonzales-pe dev-dependency from 4.2.4 to 4.3.0 (elastic#64401)
  ...

# Conflicts:
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
#	x-pack/plugins/ingest_pipelines/public/shared_imports.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:skip Skip the PR/issue when compiling release notes review v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants