Skip to content
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

Merged

Conversation

junqiu-lei
Copy link
Member

@junqiu-lei junqiu-lei commented Dec 20, 2022

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.

@junqiu-lei junqiu-lei requested a review from a team December 20, 2022 18:41
@junqiu-lei junqiu-lei self-assigned this Dec 20, 2022
Copy link
Member

@ashwin-pc ashwin-pc left a 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?

@junqiu-lei
Copy link
Member Author

The PR title seems quite different from what I can see in the change. Is the PR title accurate?

Probably global filter bar is better tittle? This PR mainly for time filters.

@junqiu-lei junqiu-lei changed the title Add global query bar to maps Add global filter bar to maps Dec 20, 2022
@junqiu-lei junqiu-lei requested a review from a team December 21, 2022 22:54
Signed-off-by: Junqiu Lei <[email protected]>
@junqiu-lei junqiu-lei merged commit 5168a6e into opensearch-project:feature/new-maps Dec 22, 2022

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);
Copy link
Member

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

Copy link
Member Author

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.

@junqiu-lei junqiu-lei changed the title Add global filter bar to maps Add global time filter bar to maps Jan 11, 2023
@junqiu-lei junqiu-lei deleted the query_bar branch February 23, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants