Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
b7963048
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
704
Star
9572
Fork
3514
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
b7963048
编写于
9月 13, 2021
作者:
W
Wangyizhi1
提交者:
GitHub
9月 13, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
convert process definition id to code (#6191)
上级
ca488fcf
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
64 addition
and
59 deletion
+64
-59
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
...inscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
+1
-0
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
...rc/js/conf/home/pages/dag/_source/formModel/formModel.vue
+6
-2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
...es/dag/_source/formModel/tasks/_source/dependItemList.vue
+10
-10
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
.../pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
+3
-3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
...ges/projects/pages/definition/pages/list/_source/list.vue
+30
-30
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue
...ects/pages/definition/pages/list/_source/relatedItems.vue
+7
-7
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+7
-7
未找到文件。
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
浏览文件 @
b7963048
...
...
@@ -31,6 +31,7 @@
@
addTaskInfo=
"addTaskInfo"
@
close=
"closeTaskDrawer"
@
onSubProcess=
"toSubProcess"
:type=
"type"
></m-form-model>
</el-drawer>
<el-dialog
...
...
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
浏览文件 @
b7963048
...
...
@@ -21,7 +21,7 @@
<span
class=
"go-subtask"
>
<!-- Component can't pop up box to do component processing -->
<m-log
v-if=
"taskInstance"
v-if=
"t
ype === 'instance' && t
askInstance"
:item=
"backfillItem"
:task-instance-id=
"taskInstance.id"
>
...
...
@@ -525,7 +525,11 @@
directives
:
{
clickoutside
},
mixins
:
[
disabledState
],
props
:
{
nodeData
:
Object
nodeData
:
Object
,
type
:
{
type
:
String
,
default
:
''
}
},
inject
:
[
'
dagChart
'
],
methods
:
{
...
...
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
浏览文件 @
b7963048
...
...
@@ -85,7 +85,7 @@
// add task list
let
projectId
=
this
.
projectList
[
0
].
value
this
.
_getProcessByProject
Id
(
projectId
).
then
(
definitionList
=>
{
this
.
_getProcessByProject
Code
(
).
then
(
definitionList
=>
{
// dependItemList index
let
is
=
(
value
)
=>
_
.
some
(
this
.
dependItemList
,
{
definitionCode
:
value
})
let
noArr
=
_
.
filter
(
definitionList
,
v
=>
!
is
(
v
.
value
))
...
...
@@ -124,13 +124,13 @@
resolve
()
})
},
_getProcessByProject
Id
(
id
)
{
_getProcessByProject
Code
(
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessByProject
Id
'
,
{
projectId
:
id
}
).
then
(
res
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessByProject
Code
'
).
then
(
res
=>
{
let
definitionList
=
_
.
map
(
_
.
cloneDeep
(
res
),
v
=>
{
return
{
value
:
v
.
code
,
label
:
v
.
name
value
:
v
.
processDefinition
.
code
,
label
:
v
.
processDefinition
.
name
}
})
resolve
(
definitionList
)
...
...
@@ -143,11 +143,11 @@
_getDependItemList
(
codes
,
is
=
true
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
is
)
{
this
.
store
.
dispatch
(
'
dag/getProcessTasksList
'
,
{
processDefinitionC
ode
:
codes
}).
then
(
res
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessTasksList
'
,
{
c
ode
:
codes
}).
then
(
res
=>
{
resolve
([
'
ALL
'
].
concat
(
_
.
map
(
res
,
v
=>
v
.
name
)))
})
}
else
{
this
.
store
.
dispatch
(
'
dag/getTaskListDefIdAll
'
,
{
processDefinitionCodeList
:
codes
}).
then
(
res
=>
{
this
.
store
.
dispatch
(
'
dag/getTaskListDefIdAll
'
,
{
codes
:
codes
}).
then
(
res
=>
{
resolve
(
res
)
})
}
...
...
@@ -157,7 +157,7 @@
* change process get dependItemList
*/
_onChangeProjectId
(
value
,
itemIndex
)
{
this
.
_getProcessByProject
Id
(
value
).
then
(
definitionList
=>
{
this
.
_getProcessByProject
Code
(
).
then
(
definitionList
=>
{
/* this.$set(this.dependItemList, itemIndex, this._dlOldParams(value, definitionList, item)) */
let
definitionCode
=
definitionList
[
0
].
value
this
.
_getDependItemList
(
definitionCode
).
then
(
depTasksList
=>
{
...
...
@@ -245,7 +245,7 @@
if
(
!
this
.
dependItemList
.
length
)
{
if
(
!
this
.
projectList
.
length
)
return
let
projectId
=
this
.
projectList
[
0
].
value
this
.
_getProcessByProject
Id
(
projectId
).
then
(
definitionList
=>
{
this
.
_getProcessByProject
Code
(
).
then
(
definitionList
=>
{
let
value
=
definitionList
[
0
].
value
this
.
_getDependItemList
(
value
).
then
(
depTasksList
=>
{
this
.
$emit
(
'
dependItemListEvent
'
,
_
.
concat
(
this
.
dependItemList
,
this
.
_rtNewParams
(
value
,
definitionList
,
depTasksList
,
projectId
)))
...
...
@@ -257,7 +257,7 @@
// get item list
this
.
_getDependItemList
(
codes
,
false
).
then
(
res
=>
{
_
.
map
(
this
.
dependItemList
,
(
v
,
i
)
=>
{
this
.
_getProcessByProject
Id
(
v
.
projectId
).
then
(
definitionList
=>
{
this
.
_getProcessByProject
Code
(
).
then
(
definitionList
=>
{
this
.
$set
(
this
.
dependItemList
,
i
,
this
.
_rtOldParams
(
v
.
definitionCode
,
definitionList
,
[
'
ALL
'
].
concat
(
_
.
map
(
res
[
v
.
definitionCode
]
||
[],
v
=>
v
.
name
)),
v
))
})
})
...
...
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
浏览文件 @
b7963048
...
...
@@ -107,9 +107,9 @@
resolve
()
})
},
_getProcessByProject
Id
(
id
)
{
_getProcessByProject
Code
(
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessByProject
Id
'
,
{
projectId
:
id
}
).
then
(
res
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessByProject
Code
'
).
then
(
res
=>
{
this
.
definitionList
=
_
.
map
(
_
.
cloneDeep
(
res
),
v
=>
{
return
{
value
:
v
.
code
,
...
...
@@ -168,7 +168,7 @@
// get item list
this
.
_getDependItemList
(
codes
,
false
).
then
(
res
=>
{
_
.
map
(
this
.
dependItemList
,
(
v
,
i
)
=>
{
this
.
_getProcessByProject
Id
(
v
.
projectId
).
then
(
definitionList
=>
{
this
.
_getProcessByProject
Code
(
).
then
(
definitionList
=>
{
this
.
$set
(
this
.
dependItemList
,
i
,
this
.
_rtOldParams
(
v
.
definitionCode
,
[
'
ALL
'
].
concat
(
_
.
map
(
res
[
v
.
definitionCode
]
||
[],
v
=>
v
.
name
)),
v
))
})
})
...
...
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
浏览文件 @
b7963048
...
...
@@ -115,12 +115,12 @@
:title=
"$t('Delete?')"
@
onConfirm=
"_delete({},-1)"
>
<el-button
style=
"position: absolute; bottom: -48px; left: 19px;"
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Id
s"
slot=
"reference"
>
{{$t('Delete')}}
</el-button>
<el-button
style=
"position: absolute; bottom: -48px; left: 19px;"
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Code
s"
slot=
"reference"
>
{{$t('Delete')}}
</el-button>
</el-popconfirm>
</el-tooltip>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Id
s"
style=
"position: absolute; bottom: -48px; left: 80px;"
@
click=
"_batchExport(item)"
>
{{$t('Export')}}
</el-button>
<span><el-button
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Id
s"
style=
"position: absolute; bottom: -48px; left: 140px;"
@
click=
"_batchCopy(item)"
>
{{$t('Batch copy')}}
</el-button></span>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Id
s"
style=
"position: absolute; bottom: -48px; left: 225px;"
@
click=
"_batchMove(item)"
>
{{$t('Batch move')}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Code
s"
style=
"position: absolute; bottom: -48px; left: 80px;"
@
click=
"_batchExport(item)"
>
{{$t('Export')}}
</el-button>
<span><el-button
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Code
s"
style=
"position: absolute; bottom: -48px; left: 140px;"
@
click=
"_batchCopy(item)"
>
{{$t('Batch copy')}}
</el-button></span>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"!strSelect
Code
s"
style=
"position: absolute; bottom: -48px; left: 225px;"
@
click=
"_batchMove(item)"
>
{{$t('Batch move')}}
</el-button>
<el-drawer
:visible.sync=
"drawer"
size=
""
...
...
@@ -162,7 +162,7 @@
data
()
{
return
{
list
:
[],
strSelect
Id
s
:
''
,
strSelect
Code
s
:
''
,
checkAll
:
false
,
drawer
:
false
,
versionData
:
{
...
...
@@ -243,7 +243,7 @@
* Timing manage
*/
_timingManage
(
item
)
{
this
.
$router
.
push
({
path
:
`/projects/
${
this
.
project
Id
}
/definition/list/timing/
${
item
.
code
}
`
})
this
.
$router
.
push
({
path
:
`/projects/
${
this
.
project
Code
}
/definition/list/timing/
${
item
.
code
}
`
})
},
/**
* delete
...
...
@@ -293,10 +293,10 @@
*/
_copyProcess
(
item
)
{
this
.
copyProcess
({
processDefinitionIds
:
item
.
id
,
targetProject
Id
:
item
.
projectId
codes
:
item
.
code
,
targetProject
Code
:
item
.
projectCode
}).
then
(
res
=>
{
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
this
.
$message
.
success
(
res
.
msg
)
// $('body').find('.tooltip.fade.top.in').remove()
this
.
_onUpdate
()
...
...
@@ -310,10 +310,10 @@
*/
_moveProcess
(
item
)
{
this
.
moveProcess
({
processDefinitionIds
:
item
.
id
,
targetProject
Id
:
item
.
projectId
codes
:
item
.
code
,
targetProject
Code
:
item
.
projectCode
}).
then
(
res
=>
{
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
this
.
$message
.
success
(
res
.
msg
)
$
(
'
body
'
).
find
(
'
.tooltip.fade.top.in
'
).
remove
()
this
.
_onUpdate
()
...
...
@@ -324,7 +324,7 @@
_export
(
item
)
{
this
.
exportDefinition
({
processDefinitionIds
:
item
.
id
,
codes
:
item
.
code
,
fileName
:
item
.
name
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
||
''
)
...
...
@@ -334,7 +334,7 @@
* switch version in process definition version list
*
* @param version the version user want to change
* @param processDefinition
Id the process definition id
* @param processDefinition
Code the process definition code
* @param fromThis fromThis
*/
mVersionSwitchProcessDefinitionVersion
({
version
,
processDefinitionCode
,
fromThis
})
{
...
...
@@ -353,7 +353,7 @@
*
* @param pageNo page number
* @param pageSize page size
* @param processDefinition
Id the process definition id
of page version
* @param processDefinition
Code the process definition Code
of page version
* @param fromThis fromThis
*/
mVersionGetProcessDefinitionVersionsPage
({
pageNo
,
pageSize
,
processDefinitionCode
,
fromThis
})
{
...
...
@@ -374,7 +374,7 @@
* delete one version of process definition
*
* @param version the version need to delete
* @param processDefinition
Id the process definition id
user want to delete
* @param processDefinition
Code the process definition code
user want to delete
* @param fromThis fromThis
*/
mVersionDeleteProcessDefinitionVersion
({
version
,
processDefinitionCode
,
fromThis
})
{
...
...
@@ -421,14 +421,14 @@
_batchExport
()
{
this
.
exportDefinition
({
processDefinitionIds
:
this
.
strSelectId
s
,
codes
:
this
.
strSelectCode
s
,
fileName
:
'
process_
'
+
new
Date
().
getTime
()
}).
then
(
res
=>
{
this
.
_onUpdate
()
this
.
checkAll
=
false
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
}).
catch
(
e
=>
{
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
this
.
checkAll
=
false
this
.
$message
.
error
(
e
.
msg
)
})
...
...
@@ -440,8 +440,8 @@
this
.
relatedItemsDialog
=
true
this
.
tmp
=
false
},
onBatchCopy
(
item
)
{
this
.
_copyProcess
({
id
:
this
.
strSelectIds
,
projectId
:
item
})
onBatchCopy
(
projectCode
)
{
this
.
_copyProcess
({
code
:
this
.
strSelectCodes
,
projectCode
:
projectCode
})
this
.
relatedItemsDialog
=
false
},
closeRelatedItems
()
{
...
...
@@ -454,8 +454,8 @@
this
.
tmp
=
true
this
.
relatedItemsDialog
=
true
},
onBatchMove
(
item
)
{
this
.
_moveProcess
({
id
:
this
.
strSelectIds
,
projectId
:
item
})
onBatchMove
(
projectCode
)
{
this
.
_moveProcess
({
code
:
this
.
strSelectCodes
,
projectCode
:
projectCode
})
this
.
relatedItemsDialog
=
false
},
/**
...
...
@@ -478,22 +478,22 @@
*/
_arrDelChange
(
v
)
{
let
arr
=
[]
arr
=
_
.
map
(
v
,
'
id
'
)
this
.
strSelect
Id
s
=
_
.
join
(
arr
,
'
,
'
)
arr
=
_
.
map
(
v
,
'
code
'
)
this
.
strSelect
Code
s
=
_
.
join
(
arr
,
'
,
'
)
},
/**
* batch delete
*/
_batchDelete
()
{
this
.
batchDeleteDefinition
({
processDefinitionIds
:
this
.
strSelectId
s
codes
:
this
.
strSelectCode
s
}).
then
(
res
=>
{
this
.
_onUpdate
()
this
.
checkAll
=
false
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
this
.
$message
.
success
(
res
.
msg
)
}).
catch
(
e
=>
{
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
this
.
checkAll
=
false
this
.
$message
.
error
(
e
.
msg
||
''
)
})
...
...
@@ -512,7 +512,7 @@
deep
:
true
},
pageNo
()
{
this
.
strSelect
Id
s
=
''
this
.
strSelect
Code
s
=
''
}
},
created
()
{
...
...
@@ -520,7 +520,7 @@
mounted
()
{
},
computed
:
{
...
mapState
(
'
dag
'
,
[
'
project
Id
'
,
'
project
Code
'
])
...
mapState
(
'
dag
'
,
[
'
projectCode
'
])
},
components
:
{
mVersions
,
mStart
,
mTiming
,
mRelatedItems
}
}
...
...
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue
浏览文件 @
b7963048
...
...
@@ -26,11 +26,11 @@
<m-list-box-f>
<template
slot=
"name"
><strong>
*
</strong>
{{
$t
(
'
Project Name
'
)
}}
</
template
>
<
template
slot=
"content"
>
<el-select
v-model=
"
itemI
d"
size=
"small"
>
<el-select
v-model=
"
selecte
d"
size=
"small"
>
<el-option
v-for=
"item in itemList"
:key=
"item.
id
"
:value=
"item.
id
"
:key=
"item.
code
"
:value=
"item.
code
"
:label=
"item.name"
>
</el-option>
</el-select>
...
...
@@ -52,7 +52,7 @@
return
{
store
,
itemList
:
[],
itemI
d
:
''
selecte
d
:
''
}
},
props
:
{
...
...
@@ -65,14 +65,14 @@
_ok
()
{
if
(
this
.
_verification
())
{
if
(
this
.
tmp
)
{
this
.
$emit
(
'
onBatchMove
'
,
this
.
itemI
d
)
this
.
$emit
(
'
onBatchMove
'
,
this
.
selecte
d
)
}
else
{
this
.
$emit
(
'
onBatchCopy
'
,
this
.
itemI
d
)
this
.
$emit
(
'
onBatchCopy
'
,
this
.
selecte
d
)
}
}
},
_verification
()
{
if
(
!
this
.
itemI
d
)
{
if
(
!
this
.
selecte
d
)
{
this
.
$message
.
warning
(
`
${
i18n
.
$t
(
'
Project name is required
'
)}
`
)
return
false
}
...
...
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
浏览文件 @
b7963048
...
...
@@ -176,8 +176,8 @@ export default {
copyProcess
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
post
(
`projects/
${
state
.
projectCode
}
/process-definition/batch-copy`
,
{
processDefinitionIds
:
payload
.
processDefinitionId
s
,
targetProject
Id
:
payload
.
targetProjectId
codes
:
payload
.
code
s
,
targetProject
Code
:
payload
.
targetProjectCode
},
res
=>
{
resolve
(
res
)
}).
catch
(
e
=>
{
...
...
@@ -192,8 +192,8 @@ export default {
moveProcess
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
post
(
`projects/
${
state
.
projectCode
}
/process-definition/batch-move`
,
{
processDefinitionIds
:
payload
.
processDefinitionId
s
,
targetProject
Id
:
payload
.
targetProjectId
codes
:
payload
.
code
s
,
targetProject
Code
:
payload
.
targetProjectCode
},
res
=>
{
resolve
(
res
)
}).
catch
(
e
=>
{
...
...
@@ -386,7 +386,7 @@ export default {
/**
* Get a list of process definitions by project id
*/
getProcessByProject
Id
({
state
},
payload
)
{
getProcessByProject
Code
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
get
(
`projects/
${
state
.
projectCode
}
/process-definition/all`
,
payload
,
res
=>
{
resolve
(
res
.
data
)
...
...
@@ -674,7 +674,7 @@ export default {
}
}
io
.
post
(
`projects/
${
state
.
projectCode
}
/process-definition/batch-export`
,
{
processDefinitionIds
:
payload
.
processDefinitionId
s
},
res
=>
{
io
.
post
(
`projects/
${
state
.
projectCode
}
/process-definition/batch-export`
,
{
codes
:
payload
.
code
s
},
res
=>
{
downloadBlob
(
res
,
payload
.
fileName
)
},
e
=>
{
...
...
@@ -793,7 +793,7 @@ export default {
},
getTaskListDefIdAll
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
get
(
`projects/
${
state
.
projectCode
}
/process-definition/
t
atch-query-tasks`
,
payload
,
res
=>
{
io
.
get
(
`projects/
${
state
.
projectCode
}
/process-definition/
b
atch-query-tasks`
,
payload
,
res
=>
{
resolve
(
res
.
data
)
}).
catch
(
e
=>
{
reject
(
e
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录