-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add global time filter bar to maps #131
Add global time filter bar to maps #131
Conversation
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.
The PR title seems quite different from what I can see in the change. Is the PR title accurate?
maps_dashboards/public/components/map_container/map_container.scss
Outdated
Show resolved
Hide resolved
Probably global filter bar is better tittle? This PR mainly for time filters. |
a908ef8
to
1b76052
Compare
Signed-off-by: Junqiu Lei <[email protected]>
1b76052
to
6bdb462
Compare
|
||
useEffect(() => { | ||
if (mapIdFromUrl) { | ||
savedObjectsClient.get<MapSavedObjectAttributes>('map', mapIdFromUrl).then((res) => { | ||
setSavedMapObject(res); | ||
setLayers(JSON.parse(res.attributes.layerList as string)); | ||
const layerList: MapLayerSpecification[] = JSON.parse(res.attributes.layerList as string); | ||
const savedMapState: MapState = JSON.parse(res.attributes.mapState as string); |
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.
Type casting is potentially dangerous for runtime, I got a runtime error on this line because I have previously created map which mapState
is undefined
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.
@ruanyl Thanks call out here! I think previously in your local code commit, there didn't have mapState. Currently for all initially created maps, it will have mapState property to the map saved object.
Signed-off-by: Junqiu Lei [email protected]
Description
This PR is for global filter bar which can be used to filter timeline for all indexPatterns.
Demo
Screen.Recording.2022-12-21.at.2.51.11.PM.mov
Issues Resolved
#103
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.