-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maps] distance spatial join (#156618)
Fixes #154605 PR adds new layer wizard for spatial join. Wizard provides an easy interface to create spatial join as well as advertising the capability in the main layer creation work flow. <img width="200" alt="Screen Shot 2023-05-04 at 12 16 45 PM" src="https://user-images.githubusercontent.com/373691/236293473-8a740171-0910-4574-8e38-0ba1ab38a5fd.png"> <img width="400" alt="Screen Shot 2023-05-04 at 12 17 07 PM" src="https://user-images.githubusercontent.com/373691/236293475-ad04cb1c-b49f-46aa-8ae6-2df62123b516.png"> PR renames `Terms joins` editor panel to `Joins` and updates panel to accommodate spatial joins. Displays UI for creating, editing and deleting spatial joins. <img width="200" alt="Screen Shot 2023-05-04 at 12 17 20 PM" src="https://user-images.githubusercontent.com/373691/236293486-49aa8063-0860-4aa7-af85-e47f899a3885.png"> <img width="400" alt="Screen Shot 2023-05-04 at 12 41 39 PM" src="https://user-images.githubusercontent.com/373691/236298721-e237b801-0539-4960-82e6-d992f5bd8bb4.png"> <img width="300" alt="Screen Shot 2023-05-04 at 12 17 25 PM" src="https://user-images.githubusercontent.com/373691/236293489-b18c7a0a-b339-42f0-870d-88785175c1f6.png"> <img width="300" alt="Screen Shot 2023-05-04 at 12 17 37 PM" src="https://user-images.githubusercontent.com/373691/236293492-f4ea3b9b-d28d-46d8-a243-c0e82cb5efda.png"> PR also updates inspector request registration name and description to provide less technical names that provide better meaning of what request is fetching and how everything fits together. I think this really helps understandability of join requests <img width="500" alt="Screen Shot 2023-05-04 at 12 22 56 PM" src="https://user-images.githubusercontent.com/373691/236294739-53d32f65-a5e5-4b6d-b41a-7f76fcd731b5.png"> #### Known issues Issues discovered by this PR that are in main and will be resolved separately. * When using spatial join wizard, if there are no matches to left source then layer gets stuck in loading state #156630 * Term join left field change not applied as expected #156631 #### Developer level changes LayerDescriptor * Changes joins from `JoinDescriptor` to `Partial<JoinDescriptor>`. This did not change the content, just updated the type to better reflect contents. JoinDescriptor * Changes right from `JoinSourceDescriptor` to `Partial<JoinSourceDescriptor>`. This did not change the content, just updated the type to better reflect contents. IVectorLayer interface changes * Remove getJoinsDisabledReason * Remove showJoinEditor IVectorSource interface changes * Replaced showJoinEditor with supportsJoins * Removed getJoinsDisabledReason Replaced GeoIndexPatternSelect prop `value` with `dataView`. 1) provides better symmetry since on change return DataView 2) First time GeoIndexPatternSelect need to use a pre-loaded data view. By passing in DataView, loading state can be more easily handled. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Nick Peihl <[email protected]>
- Loading branch information
1 parent
5d96ef9
commit 596c7b3
Showing
102 changed files
with
2,310 additions
and
1,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ export enum EMS_BASEMAP_KEYS { | |
} | ||
|
||
export enum JOIN_KEYS { | ||
DISTANCE = 'distance', | ||
TERM = 'term', | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
x-pack/plugins/maps/public/classes/joins/is_spatial_join.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { JoinDescriptor } from '../../../common/descriptor_types'; | ||
import { SOURCE_TYPES } from '../../../common/constants'; | ||
|
||
export function isSpatialJoin(joinDescriptor: Partial<JoinDescriptor>) { | ||
return joinDescriptor?.right?.type === SOURCE_TYPES.ES_DISTANCE_SOURCE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.