-
Notifications
You must be signed in to change notification settings - Fork 934
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
[Workspace] Refactor 'Associate data sources' in create page to support direct query connections #7961
[Workspace] Refactor 'Associate data sources' in create page to support direct query connections #7961
Conversation
Signed-off-by: Kapian1234 <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Kapian1234 <[email protected]>
…ch-Dashboards into creator_association
…h-Dashboards into creator_association
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7961 +/- ##
==========================================
+ Coverage 60.52% 60.55% +0.02%
==========================================
Files 3728 3730 +2
Lines 88295 88365 +70
Branches 13661 13681 +20
==========================================
+ Hits 53441 53507 +66
- Misses 31600 31606 +6
+ Partials 3254 3252 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -174,27 +182,26 @@ export const DataSourceConnectionTable = ({ | |||
}, | |||
}, | |||
{ | |||
width: '10%', | |||
width: '15%', |
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.
@Kapian1234 Seems we are re-use the same component with workspace detail side. Could you help check with @yubonluo if this width updates can be applied in workspace detail? I'm prefer to add flag
here to determine if we need to update the width.
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 width updates will indeed be applied in workspace detail, but I've checked with @yubonluo and the new width still presents well there. Perhaps the flag isn't necessary?
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Kapian1234 <[email protected]>
e138b57
to
64363b4
Compare
Signed-off-by: Kapian1234 <[email protected]>
Signed-off-by: Kapian1234 <[email protected]>
url = `${origin}${basePath}/app/dataSources/manage/${name}?dataSourceMDSId=${record.parentId}`; | ||
url = http.basePath.prepend(`/app/dataSources/${record.id}`, { | ||
withoutClientBasePath: 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.
url = `${origin}${basePath}/app/dataSources/manage/${name}?dataSourceMDSId=${record.parentId}`; | |
url = http.basePath.prepend(`/app/dataSources/${record.id}`, { | |
withoutClientBasePath: true, | |
}); | |
url = http.basePath.prepend(`/app/dataSources/manage/${name}?dataSourceMDSId=${record.parentId}`, { | |
withoutClientBasePath: true, | |
}); |
url = http.basePath.prepend(`/app/dataSources/${record.id}`, { | ||
withoutClientBasePath: 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.
url = http.basePath.prepend(`/app/dataSources/${record.id}`, { | |
withoutClientBasePath: true, | |
}); | |
url = http.basePath.prepend(`/app/dataSources/${record.id}`); |
If it's opensearch connection, shall we just go to the data source page within the workspace?
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 think we should go to the data source management page within the workspace. @yubonluo , could you help clarify this?
type DataSourceConnectionTableProps = Omit< | ||
EuiInMemoryTableProps<DataSourceConnection>, | ||
| 'columns' | ||
| 'itemsId' | ||
| 'isSelectable' | ||
| 'itemIdToExpandedRowMap' | ||
| 'isExpandable' | ||
| 'selection' | ||
| 'pagination' | ||
> & { |
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.
type DataSourceConnectionTableProps = Omit< | |
EuiInMemoryTableProps<DataSourceConnection>, | |
| 'columns' | |
| 'itemsId' | |
| 'isSelectable' | |
| 'itemIdToExpandedRowMap' | |
| 'isExpandable' | |
| 'selection' | |
| 'pagination' | |
> & { | |
type DataSourceConnectionTableProps = { | |
tableProps: Partial<EuiInMemoryTableProps<DataSourceConnection>> |
What about we moving all the table related props to a standalone entry so that it won't bother other props. And to make the props simple by using Partial.
)} | ||
</> | ||
<EuiInMemoryTable | ||
{...(restProps as EuiInMemoryTableProps<DataSourceConnection>)} |
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.
{...(restProps as EuiInMemoryTableProps<DataSourceConnection>)} | |
{...restProps} |
We'd better avoid type assertion.
Signed-off-by: Kapian1234 <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
|
…rt direct query connections (#7961) * support DQC Signed-off-by: Kapian1234 <[email protected]> * Fix UTs in workspace form select data source panel Signed-off-by: Lin Wang <[email protected]> * Remove no need IntlProvider Signed-off-by: Lin Wang <[email protected]> * Add aria-labelledby for permission inputs Signed-off-by: Lin Wang <[email protected]> * Modify UTs Signed-off-by: Kapian1234 <[email protected]> * Changeset file for PR #7961 created/updated * Modify UTs Signed-off-by: Kapian1234 <[email protected]> * Resolve some issues Signed-off-by: Kapian1234 <[email protected]> * Modify UTs Signed-off-by: Kapian1234 <[email protected]> * Fix UT errror Signed-off-by: Lin Wang <[email protected]> * update button text Signed-off-by: Kapian1234 <[email protected]> * rename onSelectItems() Signed-off-by: Kapian1234 <[email protected]> * Fix an error Signed-off-by: Kapian1234 <[email protected]> * Refactor data source connection table Signed-off-by: Lin Wang <[email protected]> * resolve some issues Signed-off-by: Kapian1234 <[email protected]> * resolve some issues Signed-off-by: Kapian1234 <[email protected]> * Fix the data source URL reference Signed-off-by: Kapian1234 <[email protected]> * Move restProps to tableProps Signed-off-by: Lin Wang <[email protected]> * Fix table not unmont after connection type changed Signed-off-by: Lin Wang <[email protected]> * Refactor selectedDataSources to selectedDataSourceConnections Signed-off-by: Lin Wang <[email protected]> * Load direct query connections after data source tab selected Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Kapian1234 <[email protected]> Signed-off-by: Lin Wang <[email protected]> Co-authored-by: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 16d160a) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rt direct query connections (#7961) (#8024) * support DQC * Fix UTs in workspace form select data source panel * Remove no need IntlProvider * Add aria-labelledby for permission inputs * Modify UTs * Changeset file for PR #7961 created/updated * Modify UTs * Resolve some issues * Modify UTs * Fix UT errror * update button text * rename onSelectItems() * Fix an error * Refactor data source connection table * resolve some issues * resolve some issues * Fix the data source URL reference * Move restProps to tableProps * Fix table not unmont after connection type changed * Refactor selectedDataSources to selectedDataSourceConnections * Load direct query connections after data source tab selected --------- (cherry picked from commit 16d160a) Signed-off-by: Kapian1234 <[email protected]> Signed-off-by: Lin Wang <[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: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…rt direct query connections (#7961) (#8024) * support DQC * Fix UTs in workspace form select data source panel * Remove no need IntlProvider * Add aria-labelledby for permission inputs * Modify UTs * Changeset file for PR #7961 created/updated * Modify UTs * Resolve some issues * Modify UTs * Fix UT errror * update button text * rename onSelectItems() * Fix an error * Refactor data source connection table * resolve some issues * resolve some issues * Fix the data source URL reference * Move restProps to tableProps * Fix table not unmont after connection type changed * Refactor selectedDataSources to selectedDataSourceConnections * Load direct query connections after data source tab selected --------- (cherry picked from commit 16d160a) Signed-off-by: Kapian1234 <[email protected]> Signed-off-by: Lin Wang <[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: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 3f2d867) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rt direct query connections (#7961) (#8024) (#8055) * support DQC * Fix UTs in workspace form select data source panel * Remove no need IntlProvider * Add aria-labelledby for permission inputs * Modify UTs * Changeset file for PR #7961 created/updated * Modify UTs * Resolve some issues * Modify UTs * Fix UT errror * update button text * rename onSelectItems() * Fix an error * Refactor data source connection table * resolve some issues * resolve some issues * Fix the data source URL reference * Move restProps to tableProps * Fix table not unmont after connection type changed * Refactor selectedDataSources to selectedDataSourceConnections * Load direct query connections after data source tab selected --------- (cherry picked from commit 16d160a) (cherry picked from commit 3f2d867) Signed-off-by: Kapian1234 <[email protected]> Signed-off-by: Lin Wang <[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: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
Refactor 'Associate data sources' in create page to support direct query connections
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration