Add datasource picker component and use it in devtools and tutorial page when multiple datasource is enabled#5756
Merged
Flyingliuhub merged 3 commits intoopensearch-project:mainfrom Jan 31, 2024
Conversation
…ample data page Signed-off-by: Lu Yu <nluyu@amazon.com>
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 <nluyu@amazon.com>
ZilongX
previously approved these changes
Jan 30, 2024
Member
|
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 <nluyu@amazon.com>
bandinib-amzn
approved these changes
Jan 31, 2024
Flyingliuhub
approved these changes
Jan 31, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jan 31, 2024
…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 <nluyu@amazon.com> * add changelog for 5756 Signed-off-by: Lu Yu <nluyu@amazon.com> * wraps prepend with i18n and fix typo Signed-off-by: Lu Yu <nluyu@amazon.com> --------- Signed-off-by: Lu Yu <nluyu@amazon.com> (cherry picked from commit b2d2b26) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
ananzh
pushed a commit
that referenced
this pull request
Jan 31, 2024
…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 <nluyu@amazon.com> (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>
yujin-emma
pushed a commit
to yujin-emma/OpenSearch-Dashboards
that referenced
this pull request
Feb 5, 2024
…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 <nluyu@amazon.com> * add changelog for 5756 Signed-off-by: Lu Yu <nluyu@amazon.com> * wraps prepend with i18n and fix typo Signed-off-by: Lu Yu <nluyu@amazon.com> --------- Signed-off-by: Lu Yu <nluyu@amazon.com> Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 sourceinstead ofDataSourceIssues Resolved
fixes #5717
Screenshot
feat.mp4
Testing the changes
Local clusterchosen as the default option. Choose the local data source, query data should be successful, choose remote data source, query data should be successfulLocal clusterchosen 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:jestyarn test:jest_integration