This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch fix-bp-add-connection in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 113a969cd118361f9e2d6cccbfe575db35aed0f9 Author: mintsweet <[email protected]> AuthorDate: Fri Oct 13 20:47:27 2023 +1300 fix(config-ui): adjust the params for bp add connection --- .../pages/blueprint/detail/components/add-connection-dialog/index.tsx | 4 ++-- config-ui/src/plugins/components/data-scope-select/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx b/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx index 38cf448b9..e648a0bad 100644 --- a/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx +++ b/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx @@ -41,12 +41,12 @@ export const AddConnectionDialog = ({ disabled = [], onCancel, onSubmit }: Props [disabled], ); - const handleSubmit = (scope: any) => { + const handleSubmit = (scopeIds: any) => { if (!selectedConnection) return; onSubmit({ pluginName: selectedConnection.plugin, connectionId: selectedConnection.id, - scopes: scope.map((sc: any) => ({ scopeId: getPluginScopeId(selectedConnection.plugin, sc) })), + scopes: scopeIds.map((scopeId: any) => ({ scopeId })), }); }; diff --git a/config-ui/src/plugins/components/data-scope-select/index.tsx b/config-ui/src/plugins/components/data-scope-select/index.tsx index 65e95bd76..463a346e1 100644 --- a/config-ui/src/plugins/components/data-scope-select/index.tsx +++ b/config-ui/src/plugins/components/data-scope-select/index.tsx @@ -65,7 +65,7 @@ export const DataScopeSelect = ({ ...res.scopes.map((sc) => ({ parentId: null, id: getPluginScopeId(plugin, sc.scope), - title: sc.scope.fullName, + title: sc.scope.fullName ?? sc.scope.name, data: sc.scope, })), ]);
