[Vega] Add Filter custom label for opensearchDashboardsAddFilter#3640
[Vega] Add Filter custom label for opensearchDashboardsAddFilter#3640joshuarrrr merged 3 commits intoopensearch-project:mainfrom
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>
joshuarrrr
left a comment
There was a problem hiding this comment.
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:jestyarn test:jest_integrationyarn test:ftr