-
Notifications
You must be signed in to change notification settings - Fork 915
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 datasource picker component and use it in devtools and tutorial page when multiple datasource is enabled #5756
Conversation
…ample data page Signed-off-by: Lu Yu <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5756 +/- ##
=======================================
Coverage 67.03% 67.03%
=======================================
Files 3296 3296
Lines 63343 63343
Branches 10087 10087
=======================================
Hits 42463 42463
Misses 18430 18430
Partials 2450 2450
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Lu Yu <[email protected]>
src/plugins/data_source_management/public/components/data_source_picker/data_source_picker.js
Outdated
Show resolved
Hide resolved
src/plugins/data_source_management/public/components/data_source_picker/data_source_picker.js
Show resolved
Hide resolved
src/plugins/data_source_management/public/components/data_source_picker/data_source_picker.js
Show resolved
Hide resolved
src/plugins/data_source_management/public/components/data_source_picker/data_source_picker.js
Outdated
Show resolved
Hide resolved
src/plugins/data_source_management/public/components/data_source_picker/data_source_picker.js
Outdated
Show resolved
Hide resolved
Thanks @BionIT for making this change. I really appreciate your efforts to unify the data source picker component and remove repetitive code. I can see the great value of this change from maintenance, consistent experience and reusability perspective. |
Signed-off-by: Lu Yu <[email protected]>
…age when multiple datasource is enabled (#5756) * add datasource picker as a component and use it in devtools and add sample data page Signed-off-by: Lu Yu <[email protected]> * add changelog for 5756 Signed-off-by: Lu Yu <[email protected]> * wraps prepend with i18n and fix typo Signed-off-by: Lu Yu <[email protected]> --------- Signed-off-by: Lu Yu <[email protected]> (cherry picked from commit b2d2b26) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…age when multiple datasource is enabled (#5756) (#5759) * add datasource picker as a component and use it in devtools and add sample data page * wraps prepend with i18n and fix typo --------- Signed-off-by: Lu Yu <[email protected]> (cherry picked from commit b2d2b26) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…age when multiple datasource is enabled (opensearch-project#5756) * add datasource picker as a component and use it in devtools and add sample data page Signed-off-by: Lu Yu <[email protected]> * add changelog for 5756 Signed-off-by: Lu Yu <[email protected]> * wraps prepend with i18n and fix typo Signed-off-by: Lu Yu <[email protected]> --------- Signed-off-by: Lu Yu <[email protected]> Signed-off-by: yujin-emma <[email protected]>
Description
This resolves #5717.
The datasource picker has different behavior in devtools and tutorial page when multiple datasource is enabled, it should be one component to ensure the behavior is the same.
This change adds datasource picker component and use it in devtools and tutorial page when multiple datasource is enabled to unify the behavior: the default option for the picker when first opening the page with the picker should be
Local cluster
. After removing the option, it should displaySelect a data source
. Also, the prepend should beData source
instead ofDataSource
Issues Resolved
fixes #5717
Screenshot
feat.mp4
Testing the changes
Local cluster
chosen as the default option. Choose the local data source, query data should be successful, choose remote data source, query data should be successfulLocal cluster
chosen as the default option. Choose the local data source, add sample data should be successful, choose remote data source, add sample data should be successfulCheck List
yarn test:jest
yarn test:jest_integration