-
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
[Maps] update LayerWizard previewLayer to take layerDescriptor instead of ISource #64461
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
<Fragment> | ||
{isIndexingTriggered ? null : ( | ||
<Fragment> | ||
<EuiButtonEmpty size="xs" flush="left" onClick={clearSource} iconType="arrowLeft"> |
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.
This button was duplicated in two places. Moved to single location.
@@ -1,40 +0,0 @@ | |||
/* |
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.
Inlined component in AddLayerPanel
. After removing duplicated button, the component is really small and does not need its own definition.
@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.
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.
x-pack/plugins/maps/public/connected_components/layer_addpanel/source_select/source_select.js
Show resolved
Hide resolved
|
||
export type RenderWizardArguments = { | ||
onPreviewSource: PreviewSourceHandler; | ||
inspectorAdapters: object; |
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.
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).
x-pack/plugins/maps/public/layers/sources/client_file_source/upload_layer_wizard.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/layers/sources/es_search_source/es_search_source.test.ts
Show resolved
Hide resolved
wrt internationalization errors, remove following lines:
|
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
The API always had the hooks for file-upload, this PR just added them to the definition so the API was properly documented. |
…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>
* master: [Maps] update LayerWizard previewLayer to take layerDescriptor instead of ISource (elastic#64461)
…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>
…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
This PR updates
previewLayer
method to receive layerDescriptor instead of anISource
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.