-
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
fixing maps #56706
fixing maps #56706
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
9847312
to
47d05b8
Compare
@@ -37,5 +37,5 @@ visualizationsSetup.types.registerAlias({ | |||
}); | |||
|
|||
if (!showMapVisualizationTypes) { | |||
visualizationsSetup.types.hideTypes(['region_map', 'tile_map']); | |||
//visualizationsSetup.types.hideTypes(['region_map', 'tile_map']); |
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 line should remain so region_map and tile_map are hidden in the create new visualization menu.
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.
yup, i uncommented this to help me test
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.
Code LGTM pending green CI. I think we can delete the query_geohash_bounds
file as a part of this, and also close #30593
@@ -46,7 +46,6 @@ import { | |||
import { dispatchRenderComplete } from '../../../../../plugins/kibana_utils/public'; | |||
import { SavedSearch } from '../../../kibana/public/discover/np_ready/types'; | |||
import { Vis } from '../np_ready/public'; | |||
import { queryGeohashBounds } from './query_geohash_bounds'; |
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.
Can we delete the query_geohash_bounds
file then? I think this was the only place it was used.
@elasticmachine merge upstream |
d2698bb
to
5e7d1bd
Compare
|
||
const defaultPrecision = 2; | ||
const maxPrecision = parseInt(config.get('visualization:tileMap:maxPrecision'), 10) || 12; |
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.
all this logic was moved inside tile_map_vis (it needs to set correct precision based on zoom level)
output.params.precision = aggConfig.params.autoPrecision | ||
? autoPrecisionVal | ||
: getPrecision(aggConfig.params.precision); | ||
output.params.precision = aggConfig.params.precision; |
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.
correct precision is calculated in tile_map_vis
@@ -117,17 +65,7 @@ export const geoHashBucketAgg = new BucketAggType<IBucketGeoHashGridAggConfig>({ | |||
write: () => {}, | |||
}, | |||
{ | |||
name: 'mapZoom', |
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.
mapZoom and mapCenter are no longer stored on the agg config
params: { | ||
geo_bounding_box: { | ||
ignore_unmapped: true, | ||
[agg.getField().name]: params.boundingBox || defaultBoundingBox, |
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.
if bounding box is not set we use default (which should exclude all data)
@@ -43,6 +43,10 @@ export const createTileMapFn = () => ({ | |||
geocentroid, | |||
}); | |||
|
|||
if (geohash && geohash.accessor) { | |||
convertedData.meta.geohash = context.columns[geohash.accessor].meta; |
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.
keep the geohash column meta information, so it can be used to construct filters
@@ -126,6 +136,14 @@ export const createTileMapVisualization = ({ serviceSettings, $injector }) => { | |||
return; | |||
} | |||
|
|||
if ( | |||
!this._geoJsonFeatureCollectionAndMeta || |
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.
when data is passed in and there are no results, we try to set the boundingBox
? zoomPrecision[this.vis.getUiState().get('mapZoom')] | ||
: getPrecision(this._kibanaMap.getGeohashPrecision()); | ||
|
||
this.vis.eventsSubject.next(updateVarsObject); |
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.
emit an event to request to update bounds
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, code review OK, tested the visualizations.
I think there might be a bug in the coordinate maps visualizations:
It seems modifying the "precision" slider does not actual update the map after clicking update
Steps:
- Create a coordinate map viz (be sure to press update)
- uncheck the "change precision on map zoom" switch
- change the precision slider
- click update -> the map does not change
Note that the map does update correctly, if you also change another setting (e.g. toggle one of the other switches and press update -> change OK).
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/discover/feature_controls/discover_security·ts.discover feature controls security global discover all privileges allow saving via the saved query management component popover with no query loadedStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
* master: (22 commits) Use log4j pattern syntax (elastic#57433) [ML] Categorization field example endpoint tests (elastic#57471) [Lens] Filter out pinned filters from saved object of Lens (elastic#57197) Lens client side shim cleanup (elastic#56976) [Maps] do not show border color for icon in legend when border width is zero (elastic#57501) refactors 'data-providers' tests (elastic#57474) add `absolute` option to `getUrlForApp` (elastic#57193) [Telemetry] Migrate public to NP (elastic#56285) address flaky test where instances might have different start… (elastic#57506) fix(NA): support legacy plugins path in plugins (elastic#57472) build immutable bundles for new platform plugins (elastic#53976) [SIEM] [Detection Engine] Reject if duplicate rule_id in request payload (elastic#57057) Add autocomplete="off" for input type="password" to appease the scanners (elastic#56922) Use default spaces suffix for signals index if spaces disabled (elastic#57244) [Alerting] Create alert design cleanup (elastic#56929) Management Api - add to migration guide (elastic#56892) fixing maps (elastic#56706) [Maps] Autocomplete for custom color palettes and custom icon palettes (elastic#56446) [Alerting] make actionGroup name's i18n-able (elastic#57404) fixed flaky test (elastic#57490) ... # Conflicts: # src/legacy/core_plugins/telemetry/public/components/__snapshots__/telemetry_form.test.js.snap # src/plugins/telemetry/public/components/telemetry_management_section.tsx
Summary
replaces two existing tile map hacks for a new one:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers