Skip to content

Commit

Permalink
fix(config-ui): the jenkins scope id changed (apache#6222)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed Oct 11, 2023
1 parent adf335f commit d3cd816
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)))}
/>
Expand All @@ -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)))}
/>
Expand Down
2 changes: 1 addition & 1 deletion config-ui/src/plugins/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit d3cd816

Please sign in to comment.