-
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
Refactor workspace datasource association #8545
Refactor workspace datasource association #8545
Conversation
…t page Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
…een dissociated Signed-off-by: Yulong Ruan <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8545 +/- ##
==========================================
- Coverage 60.93% 60.93% -0.01%
==========================================
Files 3771 3777 +6
Lines 89541 89845 +304
Branches 14017 14082 +65
==========================================
+ Hits 54563 54745 +182
- Misses 31567 31668 +101
- Partials 3411 3432 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
error?: string; | ||
} | ||
|
||
export interface IWorkspaceClient { |
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.
I guess we may need a TODO here to add other methods of client.
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.
Yes, those should be refactored as well
} | ||
|
||
export interface WorkspaceUI { | ||
DataSourceAssociation: (props: DataSourceAssociationProps) => JSX.Element; |
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.
Nit: How about use typeof DataSourceAssociation
here?
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.
Here is interface definition in core, DataSourceAssociation
is the implementation in workspace plugin, so it should be the other way around.
|
||
const isDashboardAdmin = !!application?.capabilities?.dashboards?.isDashboardAdmin; | ||
const canAssociateDataSource = | ||
!!currentWorkspace && !currentWorkspace.readonly && isDashboardAdmin; |
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.
Nit: Since we already check isDashboardAdmin
at the end, do we need to check if workspace readonly here?
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.
Removed
Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
* refactor: add data source association button to data source management page Signed-off-by: Yulong Ruan <[email protected]> * feat: add action button to dissociate data source from data source table Signed-off-by: Yulong Ruan <[email protected]> * Changeset file for PR #8545 created/updated * fix: automatically set a default data source if default data source been dissociated Signed-off-by: Yulong Ruan <[email protected]> * feat: implement bulk dissociate in data source management page Signed-off-by: Yulong Ruan <[email protected]> * fix lint Signed-off-by: Yulong Ruan <[email protected]> --------- Signed-off-by: Yulong Ruan <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit fc03639) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* refactor: add data source association button to data source management page * feat: add action button to dissociate data source from data source table * Changeset file for PR #8545 created/updated * fix: automatically set a default data source if default data source been dissociated * feat: implement bulk dissociate in data source management page * fix lint --------- (cherry picked from commit fc03639) Signed-off-by: Yulong Ruan <[email protected]> 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> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* refactor: add data source association button to data source management page Signed-off-by: Yulong Ruan <[email protected]> * feat: add action button to dissociate data source from data source table Signed-off-by: Yulong Ruan <[email protected]> * Changeset file for PR opensearch-project#8545 created/updated * fix: automatically set a default data source if default data source been dissociated Signed-off-by: Yulong Ruan <[email protected]> * feat: implement bulk dissociate in data source management page Signed-off-by: Yulong Ruan <[email protected]> * fix lint Signed-off-by: Yulong Ruan <[email protected]> --------- Signed-off-by: Yulong Ruan <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* refactor: add data source association button to data source management page Signed-off-by: Yulong Ruan <[email protected]> * feat: add action button to dissociate data source from data source table Signed-off-by: Yulong Ruan <[email protected]> * Changeset file for PR opensearch-project#8545 created/updated * fix: automatically set a default data source if default data source been dissociated Signed-off-by: Yulong Ruan <[email protected]> * feat: implement bulk dissociate in data source management page Signed-off-by: Yulong Ruan <[email protected]> * fix lint Signed-off-by: Yulong Ruan <[email protected]> --------- Signed-off-by: Yulong Ruan <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
This PR refactored the data source management page to include:
Screen.Recording.2024-10-10.at.18.43.16.mov
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration