-
Notifications
You must be signed in to change notification settings - Fork 894
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
[Multiple Datasource] Add component to show single selected data source in read only mode #6125
Conversation
Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
@BionIT can we add the changelog? Thanks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6125 +/- ##
==========================================
- Coverage 67.15% 67.15% -0.01%
==========================================
Files 3326 3327 +1
Lines 64400 64415 +15
Branches 10361 10366 +5
==========================================
+ Hits 43251 43260 +9
- Misses 18619 18622 +3
- Partials 2530 2533 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
yeah, the change log has been added! |
src/plugins/data_source_management/public/components/data_source_view/data_source_view.tsx
Outdated
Show resolved
Hide resolved
src/plugins/data_source_management/public/components/data_source_view/data_source_view.tsx
Outdated
Show resolved
Hide resolved
iconType="database" | ||
iconSide="left" | ||
size="s" | ||
disabled={true} |
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.
should we have some condition here to dynamically compute the value of disabled
? like as somethingthis.props.selectedOption
? Thanks
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.
This is always disabled based on requirements, since this component is only used in readyonly mode
hideLocalCluster: boolean; | ||
dataSourceCallBackFunc: (dataSource: DataSourceOption) => void; | ||
hideLocalCluster?: boolean; | ||
dataSourceCallBackFunc?: (dataSource: DataSourceOption) => void; |
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.
Since we do "!" operation here: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6125/files#diff-ca572b8e5224968b4b5cfd2a810b1280195b20f6eff17b93657fefa89bb50ed1R75
Any reason we set these props as optional?
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.
the callback function doesn't make sense for read only component, since there is no change to the selection, but only makes sense for selectables, hope it makes sense
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.
Thanks for the response.
In that case I assume we don't need this line?:
https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6125/files#diff-ca572b8e5224968b4b5cfd2a810b1280195b20f6eff17b93657fefa89bb50ed1R91
Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
…ce in read only mode (#6125) * add component to show selected data source in read only mode Signed-off-by: Lu Yu <nluyu@amazon.com> * add change log Signed-off-by: Lu Yu <nluyu@amazon.com> * fix typo and remove unused fields Signed-off-by: Lu Yu <nluyu@amazon.com> * fix snapshot Signed-off-by: Lu Yu <nluyu@amazon.com> --------- Signed-off-by: Lu Yu <nluyu@amazon.com> (cherry picked from commit df6de4e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ce in read only mode (#6125) (#6262) * add component to show selected data source in read only mode Signed-off-by: Lu Yu <nluyu@amazon.com> * add change log Signed-off-by: Lu Yu <nluyu@amazon.com> * fix typo and remove unused fields Signed-off-by: Lu Yu <nluyu@amazon.com> * fix snapshot Signed-off-by: Lu Yu <nluyu@amazon.com> --------- Signed-off-by: Lu Yu <nluyu@amazon.com> (cherry picked from commit df6de4e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This change adds component to show single selected data source in read only mode
Issues Resolved
Screenshot
readonlysingle.mp4
Testing the changes
The following were performed in the recording:
Check List
yarn test:jest
yarn test:jest_integration