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 158938847 fix(config-ui): put jenkins scope failed (#4017)
158938847 is described below
commit 158938847f18e0208b8c739df0fbd43388637376
Author: 青湛 <[email protected]>
AuthorDate: Fri Dec 23 13:48:53 2022 +0800
fix(config-ui): put jenkins scope failed (#4017)
---
.../src/plugins/common/data-scope-list/use-data-scope-list.ts | 2 +-
config-ui/src/plugins/jenkins/components/miller-columns/index.tsx | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git
a/config-ui/src/plugins/common/data-scope-list/use-data-scope-list.ts
b/config-ui/src/plugins/common/data-scope-list/use-data-scope-list.ts
index 22347cbce..1f303e7ff 100644
--- a/config-ui/src/plugins/common/data-scope-list/use-data-scope-list.ts
+++ b/config-ui/src/plugins/common/data-scope-list/use-data-scope-list.ts
@@ -67,7 +67,7 @@ export const useDataScopeList = ({
case plugin === Plugins.Jenkins:
return {
id: sc.jobFullName,
- name: sc.name,
+ name: sc.jobFullName,
transformationRuleName: sc.transformationRuleName
}
}
diff --git a/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
b/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
index 8d8a34962..7680ddcf6 100644
--- a/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
+++ b/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
@@ -42,6 +42,12 @@ export const MillerColumns = ({
connectionId
})
+ const getJobFullName = (item: any): string => {
+ if (!item.parentId) return item.title
+ const parentItem = items.find((it) => it.id === item.parentId)
+ return `${getJobFullName(parentItem)}/${item.title}`
+ }
+
useEffect(() => {
setSelectedIds(selectedItems.map((it) => it.jobFullName))
}, [])
@@ -51,7 +57,7 @@ export const MillerColumns = ({
.filter((it) => seletedIds.includes(it.id) && it.type !== 'folder')
.map((it: any) => ({
connectionId,
- jobFullName: it.name
+ jobFullName: getJobFullName(it)
}))
onChangeItems(result)