You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/10/11 10:03:20 UTC
[incubator-devlake] branch main updated: fix(config-ui): the jenkins scope id changed (#6222)
This is an automated email from the ASF dual-hosted git repository.
abeizn 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 d3cd816aa fix(config-ui): the jenkins scope id changed (#6222)
d3cd816aa is described below
commit d3cd816aa92925e2f3f66f04d6bbf3a95a3a7bb4
Author: 青湛 <0x...@gmail.com>
AuthorDate: Wed Oct 11 23:03:13 2023 +1300
fix(config-ui): the jenkins scope id changed (#6222)
---
.../src/plugins/components/data-scope-remote/data-scope-remote.tsx | 2 +-
config-ui/src/plugins/components/data-scope-remote/search-local.tsx | 1 +
config-ui/src/plugins/components/data-scope-remote/search-remote.tsx | 4 ++--
config-ui/src/plugins/utils.ts | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/config-ui/src/plugins/components/data-scope-remote/data-scope-remote.tsx b/config-ui/src/plugins/components/data-scope-remote/data-scope-remote.tsx
index fc42fc201..000d105dd 100644
--- a/config-ui/src/plugins/components/data-scope-remote/data-scope-remote.tsx
+++ b/config-ui/src/plugins/components/data-scope-remote/data-scope-remote.tsx
@@ -60,7 +60,7 @@ export const DataScopeRemote = ({ plugin, connectionId, disabledScope, onCancel,
{config.render ? (
config.render({
connectionId,
- disabledItems: disabledScope?.map((it) => ({ id: getPluginScopeId(plugin, it) })),
+ disabledItems: disabledScope?.map((it) => ({ id: it.id })),
selectedItems: selectedScope,
onChangeSelectedItems: setSelectedScope,
})
diff --git a/config-ui/src/plugins/components/data-scope-remote/search-local.tsx b/config-ui/src/plugins/components/data-scope-remote/search-local.tsx
index 3bbb49827..51fbe241f 100644
--- a/config-ui/src/plugins/components/data-scope-remote/search-local.tsx
+++ b/config-ui/src/plugins/components/data-scope-remote/search-local.tsx
@@ -235,6 +235,7 @@ export const SearchLocal = ({ plugin, connectionId, config, disabledScope, selec
)
}
renderLoading={() => <Loading size={20} style={{ padding: '4px 12px' }} />}
+ disabledIds={(disabledScope ?? []).map((it) => it.id)}
selectedIds={selectedScope.map((it) => it.id)}
onSelectItemIds={(selectedIds: ID[]) => onChange(miller.items.filter((it) => selectedIds.includes(it.id)))}
expandedIds={miller.expandedIds}
diff --git a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
index a8ea560f4..19846c1d4 100644
--- a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
+++ b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
@@ -157,7 +157,7 @@ export const SearchRemote = ({ plugin, connectionId, config, disabledScope, sele
)
}
renderLoading={() => <Loading size={20} style={{ padding: '4px 12px' }} />}
- disabledIds={(disabledScope ?? []).map((it) => getPluginScopeId(plugin, it))}
+ disabledIds={(disabledScope ?? []).map((it) => it.id)}
selectedIds={selectedScope.map((it) => it.id)}
onSelectItemIds={(selectedIds: ID[]) => onChange(allItems.filter((it) => selectedIds.includes(it.id)))}
/>
@@ -170,7 +170,7 @@ export const SearchRemote = ({ plugin, connectionId, config, disabledScope, sele
getHasMore={() => search.total === 0}
onScroll={() => setSearch({ ...search, page: search.page + 1 })}
renderLoading={() => <Loading size={20} style={{ padding: '4px 12px' }} />}
- disabledIds={(disabledScope ?? []).map((it) => getPluginScopeId(plugin, it))}
+ disabledIds={(disabledScope ?? []).map((it) => it.id)}
selectedIds={selectedScope.map((it) => it.id)}
onSelectItemIds={(selectedIds: ID[]) => onChange(allItems.filter((it) => selectedIds.includes(it.id)))}
/>
diff --git a/config-ui/src/plugins/utils.ts b/config-ui/src/plugins/utils.ts
index 210147619..f58667ffd 100644
--- a/config-ui/src/plugins/utils.ts
+++ b/config-ui/src/plugins/utils.ts
@@ -30,7 +30,7 @@ export const getPluginScopeId = (plugin: string, scope: any) => {
case 'gitlab':
return `${scope.gitlabId}`;
case 'jenkins':
- return `${scope.jobFullName}`;
+ return `${scope.fullName}`;
case 'bitbucket':
return `${scope.bitbucketId}`;
case 'sonarqube':