-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat(native-filters): Use datasets in dashboard as default options for native filters #14374
feat(native-filters): Use datasets in dashboard as default options for native filters #14374
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.
LGTM - small nit
({ datasources }) => datasources, | ||
); | ||
|
||
console.log({ loadedDatasets }); |
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.
console.log({ loadedDatasets }); |
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.
Oops! 😄
@kgabryje awesome!! |
Codecov Report
@@ Coverage Diff @@
## master #14374 +/- ##
==========================================
- Coverage 77.15% 76.98% -0.18%
==========================================
Files 954 954
Lines 48189 48197 +8
Branches 6002 6006 +4
==========================================
- Hits 37180 37103 -77
- Misses 10812 10898 +86
+ Partials 197 196 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…r native filters (apache#14374) * Use defaultOptions in dataset picker * Remove console log * Temporarily skip failing test
SUMMARY
When user creates a native filter, display only datasets used in current dashboard as options in dataset picker. When user starts typing, send a query to backend for other available datasets.
E.g. there are datasets "a_dataset", "b_dataset" and "c_dataset". If the current dashboard uses datasets "a_dataset" and "b_dataset", only those 2 will be displayed in dataset picker in native filters modal. When user starts typing "c..." in dataset picker, "c_dataset" will be fetched from backend and displayed as an option.
If a dashboard uses only 1 dataset, that dataset will be used as a default initial value in the dataset picker. If the dashboard uses more datasets, no default value will be used.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-04-27.at.14.24.44.mov
TEST PLAN
ADDITIONAL INFORMATION
CC @villebro @junlincc @ktmud