-
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
Pass global filters & queries to coordinate maps vis. #30595
Conversation
src/legacy/core_plugins/tile_map/public/coordinate_maps_visualization.js
Outdated
Show resolved
Hide resolved
Pinging @elastic/kibana-app |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
tested on chrome linux and it works ok
src/legacy/core_plugins/tile_map/public/coordinate_maps_visualization.js
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/tile_map/public/coordinate_maps_visualization.js
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
9cd4244
to
bbfc7ae
Compare
@ppisljar Pushed some updates w/ notes. Lmk what you think. |
* under the License. | ||
*/ | ||
|
||
export { 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.
Added a new utils
directory to visualize/loader
-- I think this is something we will be able to make use of elsewhere, e.g. extracting some of the field-formatter specific stuff from pipeline_helpers
and moving it here
@@ -172,7 +168,7 @@ export function CoordinateMapsVisualizationProvider(Notifier, Private) { | |||
tooltipFormatter: this._geoJsonFeatureCollectionAndMeta ? boundTooltipFormatter : null, | |||
mapType: newParams.mapType, | |||
isFilteredByCollar: this._isFilteredByCollar(), | |||
fetchBounds: this.getGeohashBounds.bind(this), | |||
fetchBounds: () => this.vis.API.getGeohashBounds(), // TODO: Remove this (elastic/kibana#30593) |
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.
I don't believe it is necessary to pass this.vis
to the function here, as it is already available in embedded_visualize_handler
and should be the same object, but let me know if for some reason this is an incorrect assumption.
This comment has been minimized.
This comment has been minimized.
Code LGTM! 👍 |
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.
LGTM, tested on chrome linux with and without pipeline data loader, works good
retest |
💔 Build Failed |
1979add
to
27153c1
Compare
This comment has been minimized.
This comment has been minimized.
retest |
💔 Build Failed |
retest |
💔 Build Failed |
These failures would be fixed by a merge with master |
c73d60d
to
5ac4368
Compare
💚 Build Succeeded |
Fixes #23261.
Summary
When you click to fit coordinate map data to the
geo_bounding_box
, the vis makes a call to ES usingsearchSource
to retrieve the bounds for that query. Everything worked fine with filters applied in the appState, but globalState filters & queries were not being added, and the vis did not have access to them.After some discussions with @ppisljar, @timroes, and @flash1293, we decided that, for the time being, we'll work around this limitation by attaching global queries/filters to the vis object inside of
embedded_visualize_handler
, so that they can be accessed & added tosearchSource
within the visualization itself.This is not a long-term solution, and it is something we intend to remove in the future by looking for ways to remove
searchSource
from the map vis entirely: #30593.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibility