-
Notifications
You must be signed in to change notification settings - Fork 885
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
[Vega] Add Filter custom label for opensearchDashboardsAddFilter #3640
Conversation
Signed-off-by: Aswath <it.aswath@gmail.com>
Signed-off-by: Aswath <it.aswath@gmail.com>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #3640 +/- ##
=======================================
Coverage 66.45% 66.46%
=======================================
Files 3208 3209 +1
Lines 61593 61610 +17
Branches 9502 9505 +3
=======================================
+ Hits 40932 40947 +15
- Misses 18384 18385 +1
- Partials 2277 2278 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com>
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.
Love to see this addition. Thanks @aswath86 !
Ideally, we'd love a functional or unit test for this, but there are no existing unit tests for OpenSearch-Dashboards/test/functional/apps/visualize/_vega_chart.ts Lines 263 to 269 in 2de11ff
there's little benefit, because our testing service for the filterBar has no mechanisms for retrieving the custom label/filter alias we're now able to set: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/test/functional/services/filter_bar.ts |
* [Vega] Add Filter custom label for opensearchDashboardsAddFilter Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> --------- Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> (cherry picked from commit 276fae9) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…sAddFilter (#3690) * [Vega] Add Filter custom label for opensearchDashboardsAddFilter (#3640) * [Vega] Add Filter custom label for opensearchDashboardsAddFilter Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> --------- Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> (cherry picked from commit 276fae9) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * add changelog Signed-off-by: Josh Romero <rmerqg@amazon.com> --------- Signed-off-by: Aswath <it.aswath@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Josh Romero <rmerqg@amazon.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Josh Romero <rmerqg@amazon.com>
…nsearch-project#3640) * [Vega] Add Filter custom label for opensearchDashboardsAddFilter Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> --------- Signed-off-by: Aswath <it.aswath@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> Signed-off-by: David Sinclair <david@sinclair.tech>
Description
Vega 'opensearchDashboardsAddFilter' allows to add OpenSearch Query DSL and index. The implementation buildQueryFilter takes in third parameter to set a custom label in 'Add Filter'. At the moment, opensearchDashboardsAddFilter can only take query and index parameters.
Issues Resolved
This PR adds in the third 'alias' parameter to set the custom label from Vega
buildQueryFilter = (query: QueryStringFilter['query'], index: string, alias: string)
Below image is self explanatory. The first filter in the image is without custom label (ugly, in my opinion), and the second filter is with custom label set in Vega.
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr