Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DolphinScheduler社区
DolphinScheduler
提交
03458234
DolphinScheduler
项目概览
DolphinScheduler社区
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
67
Star
1
Fork
0
代码
文件
提交
分支
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 搜索 >>
提交
03458234
编写于
8月 26, 2020
作者:
B
break60
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Feture-2753][ui]batch copy or move process
上级
0b095e78
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
215 addition
and
6 deletion
+215
-6
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
...ges/projects/pages/definition/pages/list/_source/list.vue
+82
-3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue
...ects/pages/definition/pages/list/_source/relatedItems.vue
+94
-0
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+31
-1
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
+4
-1
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
+4
-1
未找到文件。
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
浏览文件 @
03458234
...
...
@@ -139,6 +139,8 @@
</x-poptip>
<
template
v-if=
"strSelectIds !== ''"
>
<x-button
size=
"xsmall"
style=
"position: absolute; bottom: -48px; left: 80px;"
@
click=
"_batchExport(item)"
>
{{
$t
(
'
Export
'
)
}}
</x-button>
<x-button
size=
"xsmall"
style=
"position: absolute; bottom: -48px; left: 140px;"
@
click=
"_batchCopy(item)"
>
{{
$t
(
'
Batch copy
'
)
}}
</x-button>
<x-button
size=
"xsmall"
style=
"position: absolute; bottom: -48px; left: 225px;"
@
click=
"_batchMove(item)"
>
{{
$t
(
'
Batch move
'
)
}}
</x-button>
</
template
>
</div>
...
...
@@ -147,6 +149,7 @@
import
_
from
'
lodash
'
import
mStart
from
'
./start
'
import
mTiming
from
'
./timing
'
import
mRelatedItems
from
'
./relatedItems
'
import
{
mapActions
}
from
'
vuex
'
import
{
publishStatus
}
from
'
@/conf/home/pages/dag/_source/config
'
import
mVersions
from
'
./versions
'
...
...
@@ -166,7 +169,7 @@
pageSize
:
Number
},
methods
:
{
...
mapActions
(
'
dag
'
,
[
'
editProcessState
'
,
'
getStartCheck
'
,
'
getReceiver
'
,
'
deleteDefinition
'
,
'
batchDeleteDefinition
'
,
'
exportDefinition
'
,
'
getProcessDefinitionVersionsPage
'
,
'
copyProcess
'
,
'
switchProcessDefinitionVersion
'
,
'
deleteProcessDefinitionVersion
'
]),
...
mapActions
(
'
dag
'
,
[
'
editProcessState
'
,
'
getStartCheck
'
,
'
getReceiver
'
,
'
deleteDefinition
'
,
'
batchDeleteDefinition
'
,
'
exportDefinition
'
,
'
getProcessDefinitionVersionsPage
'
,
'
copyProcess
'
,
'
switchProcessDefinitionVersion
'
,
'
deleteProcessDefinitionVersion
'
,
'
moveProcess
'
]),
...
mapActions
(
'
security
'
,
[
'
getWorkerGroupsAll
'
]),
_rtPublishStatus
(
code
)
{
return
_
.
filter
(
publishStatus
,
v
=>
v
.
code
===
code
)[
0
].
desc
...
...
@@ -317,8 +320,27 @@
*/
_copyProcess
(
item
)
{
this
.
copyProcess
({
processId
:
item
.
id
processDefinitionIds
:
item
.
id
,
targetProjectId
:
item
.
projectId
}).
then
(
res
=>
{
this
.
strSelectIds
=
''
this
.
$message
.
success
(
res
.
msg
)
$
(
'
body
'
).
find
(
'
.tooltip.fade.top.in
'
).
remove
()
this
.
_onUpdate
()
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
||
''
)
})
},
/**
* move
*/
_moveProcess
(
item
)
{
this
.
moveProcess
({
processDefinitionIds
:
item
.
id
,
targetProjectId
:
item
.
projectId
}).
then
(
res
=>
{
this
.
strSelectIds
=
''
this
.
$message
.
success
(
res
.
msg
)
$
(
'
body
'
).
find
(
'
.tooltip.fade.top.in
'
).
remove
()
this
.
_onUpdate
()
...
...
@@ -469,7 +491,64 @@
this
.
$message
.
error
(
e
.
msg
)
})
},
/**
* Batch Copy
*/
_batchCopy
()
{
let
self
=
this
let
modal
=
this
.
$modal
.
dialog
({
closable
:
false
,
showMask
:
true
,
escClose
:
true
,
className
:
'
v-modal-custom
'
,
transitionName
:
'
opacityp
'
,
render
(
h
)
{
return
h
(
mRelatedItems
,
{
on
:
{
onBatchCopy
(
item
)
{
self
.
_copyProcess
({
id
:
self
.
strSelectIds
,
projectId
:
item
})
modal
.
remove
()
},
close
()
{
modal
.
remove
()
}
},
props
:
{
tmp
:
false
}
})
}
})
},
/**
* _batchMove
*/
_batchMove
()
{
let
self
=
this
let
modal
=
this
.
$modal
.
dialog
({
closable
:
false
,
showMask
:
true
,
escClose
:
true
,
className
:
'
v-modal-custom
'
,
transitionName
:
'
opacityp
'
,
render
(
h
)
{
return
h
(
mRelatedItems
,
{
on
:
{
onBatchMove
(
item
)
{
self
.
_moveProcess
({
id
:
self
.
strSelectIds
,
projectId
:
item
})
modal
.
remove
()
},
close
()
{
modal
.
remove
()
}
},
props
:
{
tmp
:
true
}
})
}
})
},
/**
* Edit state
*/
...
...
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue
0 → 100644
浏览文件 @
03458234
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<
template
>
<m-popup
ref=
"popup"
:ok-text=
"$t('Confirm')"
:nameText=
"$t('Related items')"
@
ok=
"_ok"
>
<template
slot=
"content"
>
<div
class=
"create-tenement-model"
>
<m-list-box-f>
<template
slot=
"name"
><strong>
*
</strong>
{{
$t
(
'
Project Name
'
)
}}
</
template
>
<
template
slot=
"content"
>
<x-select
v-model=
"itemId"
>
<x-option
v-for=
"item in itemList"
:key=
"item.id"
:value=
"item.id"
:label=
"item.name"
>
</x-option>
</x-select>
</
template
>
</m-list-box-f>
</div>
</template>
</m-popup>
</template>
<
script
>
import
_
from
'
lodash
'
import
i18n
from
'
@/module/i18n
'
import
store
from
'
@/conf/home/store
'
import
mPopup
from
'
@/module/components/popup/popup
'
import
mListBoxF
from
'
@/module/components/listBoxF/listBoxF
'
export
default
{
name
:
'
create-tenement
'
,
data
()
{
return
{
store
,
itemList
:
[],
itemId
:
''
}
},
props
:
{
tmp
:
Boolean
},
methods
:
{
_ok
()
{
if
(
this
.
_verification
())
{
if
(
this
.
tmp
)
{
this
.
$emit
(
'
onBatchMove
'
,
this
.
itemId
)
}
else
{
this
.
$emit
(
'
onBatchCopy
'
,
this
.
itemId
)
}
}
},
_verification
()
{
if
(
!
this
.
itemId
)
{
this
.
$message
.
warning
(
`
${
i18n
.
$t
(
'
Project name is required
'
)}
`
)
return
false
}
return
true
}
},
watch
:
{
},
created
()
{
this
.
store
.
dispatch
(
'
dag/getAllItems
'
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
length
>
0
)
{
this
.
itemList
=
res
.
data
}
})
},
mounted
()
{
},
components
:
{
mPopup
,
mListBoxF
}
}
</
script
>
\ No newline at end of file
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
浏览文件 @
03458234
...
...
@@ -196,7 +196,8 @@ export default {
copyProcess
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
post
(
`projects/
${
state
.
projectName
}
/process/copy`
,
{
processId
:
payload
.
processId
processDefinitionIds
:
payload
.
processDefinitionIds
,
targetProjectId
:
payload
.
targetProjectId
},
res
=>
{
resolve
(
res
)
}).
catch
(
e
=>
{
...
...
@@ -205,6 +206,35 @@ export default {
})
},
/**
* Get process definition DAG diagram details
*/
moveProcess
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
post
(
`projects/
${
state
.
projectName
}
/process/move`
,
{
processDefinitionIds
:
payload
.
processDefinitionIds
,
targetProjectId
:
payload
.
targetProjectId
},
res
=>
{
resolve
(
res
)
}).
catch
(
e
=>
{
reject
(
e
)
})
})
},
/**
* Get all the items created by the logged in user
*/
getAllItems
({
state
},
payload
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
io
.
get
(
`projects/login-user-created-project`
,
{},
res
=>
{
resolve
(
res
)
}).
catch
(
e
=>
{
reject
(
e
)
})
})
},
/**
* Get the process instance DAG diagram details
*/
...
...
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
浏览文件 @
03458234
...
...
@@ -638,5 +638,8 @@ export default {
'
Connection name
'
:
'
Connection name
'
,
'
Current connection settings
'
:
'
Current connection settings
'
,
'
Please save the DAG before formatting
'
:
'
Please save the DAG before formatting
'
,
'
Batch copy
'
:
'
Batch copy
'
'
Batch copy
'
:
'
Batch copy
'
,
'
Related items
'
:
'
Related items
'
,
'
Project name is required
'
:
'
Project name is required
'
,
'
Batch move
'
:
'
Batch move
'
}
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
浏览文件 @
03458234
...
...
@@ -638,5 +638,8 @@ export default {
'
Connection name
'
:
'
连线名
'
,
'
Current connection settings
'
:
'
当前连线设置
'
,
'
Please save the DAG before formatting
'
:
'
格式化前请先保存DAG
'
,
'
Batch copy
'
:
'
批量复制
'
'
Batch copy
'
:
'
批量复制
'
,
'
Related items
'
:
'
关联项目
'
,
'
Project name is required
'
:
'
项目名称必填
'
,
'
Batch move
'
:
'
批量移动
'
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录