This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new d7807f9e6 fix: error id for scope config changed (#7456)
d7807f9e6 is described below
commit d7807f9e662dd90a0a8e966a3e52a3d21290cc38
Author: 青湛 <[email protected]>
AuthorDate: Sat May 11 18:36:52 2024 +1200
fix: error id for scope config changed (#7456)
---
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;
}