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

Fix BWC for custom & simple filters #68

Merged
merged 3 commits into from
Aug 18, 2021

Conversation

ohltyler
Copy link
Member

Signed-off-by: Tyler Ohlsen ohltyler@amazon.com

Description

Please see the previous PR describing the original filter changes for more details. This PR is to fix some missed cases where filters created from the old UI aren't rendering correctly on the new UI.

To handle backward compatibility, we need to pass some fields via props to the subcomponents so they can render correctly:

  • oldFilterType: there used to only be one filter type per detector. Now, the filter type is on a per-filter granularity, and each type is stored within each filter in the filters array.
  • oldFilterQuery: the custom filter query used to be stored here. Now, the same field is repurposed in the new changes, but has a different meaning, since it is a dynamically built query based on each individually-created filter. SeeformikToFilterQuery() in public/pages/ReviewAndCreate/utils/helpers.ts for details on how the new filter query is dynamically generated.

Check List

  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler marked this pull request as draft August 13, 2021 00:02
@ohltyler ohltyler marked this pull request as ready for review August 13, 2021 01:01
@ohltyler ohltyler merged commit d8e937d into opensearch-project:main Aug 18, 2021
@ohltyler ohltyler deleted the bwc-fixes branch August 18, 2021 21:01
ohltyler added a commit to ohltyler/anomaly-detection-dashboards-plugin-1 that referenced this pull request Sep 1, 2021
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
ohltyler added a commit that referenced this pull request Sep 1, 2021
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler added the enhancement New feature or request label Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-compatibility enhancement New feature or request v1.1.0 Version 1.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants