[Workspace] Refactor 'Associate data sources' in create page to support direct query connections#7961
Conversation
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
…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. |
| }, | ||
| { | ||
| width: '10%', | ||
| width: '15%', |
There was a problem hiding this comment.
@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.
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 <wonglam@amazon.com>
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
e138b57 to
64363b4
Compare
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
| 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.
| 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.
| 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.
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.
| 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.
| {...(restProps as EuiInMemoryTableProps<DataSourceConnection>)} | |
| {...restProps} |
We'd better avoid type assertion.
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
|
|
…rt direct query connections (#7961) * support DQC Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Fix UTs in workspace form select data source panel Signed-off-by: Lin Wang <wonglam@amazon.com> * Remove no need IntlProvider Signed-off-by: Lin Wang <wonglam@amazon.com> * Add aria-labelledby for permission inputs Signed-off-by: Lin Wang <wonglam@amazon.com> * Modify UTs Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Changeset file for PR #7961 created/updated * Modify UTs Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Resolve some issues Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Modify UTs Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Fix UT errror Signed-off-by: Lin Wang <wonglam@amazon.com> * update button text Signed-off-by: Kapian1234 <wanjinch@amazon.com> * rename onSelectItems() Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Fix an error Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Refactor data source connection table Signed-off-by: Lin Wang <wonglam@amazon.com> * resolve some issues Signed-off-by: Kapian1234 <wanjinch@amazon.com> * resolve some issues Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Fix the data source URL reference Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Move restProps to tableProps Signed-off-by: Lin Wang <wonglam@amazon.com> * Fix table not unmont after connection type changed Signed-off-by: Lin Wang <wonglam@amazon.com> * Refactor selectedDataSources to selectedDataSourceConnections Signed-off-by: Lin Wang <wonglam@amazon.com> * Load direct query connections after data source tab selected Signed-off-by: Lin Wang <wonglam@amazon.com> --------- Signed-off-by: Kapian1234 <wanjinch@amazon.com> Signed-off-by: Lin Wang <wonglam@amazon.com> Co-authored-by: Lin Wang <wonglam@amazon.com> 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 <wanjinch@amazon.com> Signed-off-by: Lin Wang <wonglam@amazon.com> 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 <wonglam@amazon.com> 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 <wanjinch@amazon.com> Signed-off-by: Lin Wang <wonglam@amazon.com> 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 <wonglam@amazon.com> 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 <wanjinch@amazon.com> Signed-off-by: Lin Wang <wonglam@amazon.com> 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 <wonglam@amazon.com> 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:jestyarn test:jest_integration