You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2024/05/11 05:27:27 UTC

(incubator-devlake) branch fix-scope-config-error-id created (now c5951886c)

This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a change to branch fix-scope-config-error-id
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at c5951886c fix: error id for scope config changed

This branch includes the following new commits:

     new c5951886c fix: error id for scope config changed

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 01/01: fix: error id for scope config changed

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch fix-scope-config-error-id
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit c5951886c9b1af4da1697090cf2186a628a25457
Author: mintsweet <0x...@gmail.com>
AuthorDate: Sat May 11 17:27:07 2024 +1200

    fix: error id for scope config changed
---
 config-ui/src/plugins/components/scope-config/index.tsx | 6 +++---
 config-ui/src/routes/connection/connection.tsx          | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/config-ui/src/plugins/components/scope-config/index.tsx b/config-ui/src/plugins/components/scope-config/index.tsx
index 0487536b2..303191aa5 100644
--- a/config-ui/src/plugins/components/scope-config/index.tsx
+++ b/config-ui/src/plugins/components/scope-config/index.tsx
@@ -38,7 +38,7 @@ interface Props {
   scopeName: string;
   id?: ID;
   name?: string;
-  onSuccess?: (id?: ID, hideToast?: boolean) => void;
+  onSuccess?: (id?: ID) => void;
 }
 
 export const ScopeConfig = ({ plugin, connectionId, scopeId, scopeName, id, name, onSuccess }: Props) => {
@@ -83,13 +83,13 @@ export const ScopeConfig = ({ plugin, connectionId, scopeId, scopeName, id, name
 
     if (success) {
       handleHideDialog();
-      onSuccess?.(id, type === 'duplicate');
+      onSuccess?.(trId);
     }
   };
 
   const handleUpdate = (trId: ID) => {
     handleHideDialog();
-    onSuccess?.(id);
+    onSuccess?.(trId);
   };
 
   return (
diff --git a/config-ui/src/routes/connection/connection.tsx b/config-ui/src/routes/connection/connection.tsx
index e6b291589..74533aa54 100644
--- a/config-ui/src/routes/connection/connection.tsx
+++ b/config-ui/src/routes/connection/connection.tsx
@@ -241,7 +241,7 @@ export const Connection = () => {
     }
   };
 
-  const handleScopeConfigChange = async (scopeConfigId?: ID, hideToast?: boolean) => {
+  const handleScopeConfigChange = async (scopeConfigId?: ID) => {
     if (!scopeConfigId) {
       setVersion(version + 1);
       return;
@@ -250,7 +250,7 @@ export const Connection = () => {
     const [success, res] = await operator(() => API.scopeConfig.check(plugin, scopeConfigId), { hideToast: true });
 
     if (success) {
-      if (!res.projects || hideToast) {
+      if (!res.projects) {
         setVersion(version + 1);
         return;
       }