This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch fix-jenkins-scope-id in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 557b846598b513d3bcdb8be75e1090e33385466c Author: mintsweet <[email protected]> AuthorDate: Wed Oct 11 22:53:49 2023 +1300 fix(config-ui): the jenkins scope id changed --- .../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':
