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:28 UTC
(incubator-devlake) 01/01: fix: error id for scope config changed
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;
}