Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
c1e6218e
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 1 年多
通知
706
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 搜索 >>
未验证
提交
c1e6218e
编写于
8月 01, 2020
作者:
X
xingchun-chen
提交者:
GitHub
8月 01, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3374 from break60/1.3.2-release
Restore constants to variables
上级
f7f2d41a
6d1b45c1
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
15 addition
and
16 deletion
+15
-16
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
...rc/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
+5
-6
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
...uler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
+8
-8
dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
+2
-2
未找到文件。
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
浏览文件 @
c1e6218e
...
@@ -478,9 +478,9 @@ JSP.prototype.handleEventRemove = function () {
...
@@ -478,9 +478,9 @@ JSP.prototype.handleEventRemove = function () {
JSP
.
prototype
.
removeNodes
=
function
(
$id
)
{
JSP
.
prototype
.
removeNodes
=
function
(
$id
)
{
// Delete node processing(data-targetarr)
// Delete node processing(data-targetarr)
_
.
map
(
tasksAll
(),
v
=>
{
_
.
map
(
tasksAll
(),
v
=>
{
cons
t
targetarr
=
v
.
targetarr
.
split
(
'
,
'
)
le
t
targetarr
=
v
.
targetarr
.
split
(
'
,
'
)
if
(
targetarr
.
length
)
{
if
(
targetarr
.
length
)
{
cons
t
newArr
=
_
.
filter
(
targetarr
,
v1
=>
v1
!==
$id
)
le
t
newArr
=
_
.
filter
(
targetarr
,
v1
=>
v1
!==
$id
)
$
(
`#
${
v
.
id
}
`
).
attr
(
'
data-targetarr
'
,
newArr
.
toString
())
$
(
`#
${
v
.
id
}
`
).
attr
(
'
data-targetarr
'
,
newArr
.
toString
())
}
}
})
})
...
@@ -496,8 +496,7 @@ JSP.prototype.removeNodes = function ($id) {
...
@@ -496,8 +496,7 @@ JSP.prototype.removeNodes = function ($id) {
_
.
map
(
this
.
JspInstance
.
getConnections
(),
v
=>
{
_
.
map
(
this
.
JspInstance
.
getConnections
(),
v
=>
{
connects
.
push
({
connects
.
push
({
endPointSourceId
:
v
.
sourceId
,
endPointSourceId
:
v
.
sourceId
,
endPointTargetId
:
v
.
targetId
,
endPointTargetId
:
v
.
targetId
label
:
v
.
_jsPlumb
.
overlays
.
label
.
canvas
.
innerText
})
})
})
})
// Storage line dependence
// Storage line dependence
...
@@ -512,8 +511,8 @@ JSP.prototype.removeConnect = function ($connect) {
...
@@ -512,8 +511,8 @@ JSP.prototype.removeConnect = function ($connect) {
return
return
}
}
// Remove connections and remove node and node dependencies
// Remove connections and remove node and node dependencies
cons
t
targetId
=
$connect
.
targetId
le
t
targetId
=
$connect
.
targetId
cons
t
sourceId
=
$connect
.
sourceId
le
t
sourceId
=
$connect
.
sourceId
let
targetarr
=
rtTargetarrArr
(
targetId
)
let
targetarr
=
rtTargetarrArr
(
targetId
)
if
(
targetarr
.
length
)
{
if
(
targetarr
.
length
)
{
targetarr
=
_
.
filter
(
targetarr
,
v
=>
v
!==
sourceId
)
targetarr
=
_
.
filter
(
targetarr
,
v
=>
v
!==
sourceId
)
...
...
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
浏览文件 @
c1e6218e
...
@@ -23,7 +23,7 @@ import store from '@/conf/home/store'
...
@@ -23,7 +23,7 @@ import store from '@/conf/home/store'
* Node, to array
* Node, to array
*/
*/
const
rtTargetarrArr
=
(
id
)
=>
{
const
rtTargetarrArr
=
(
id
)
=>
{
cons
t
ids
=
$
(
`#
${
id
}
`
).
attr
(
'
data-targetarr
'
)
le
t
ids
=
$
(
`#
${
id
}
`
).
attr
(
'
data-targetarr
'
)
return
ids
?
ids
.
split
(
'
,
'
)
:
[]
return
ids
?
ids
.
split
(
'
,
'
)
:
[]
}
}
...
@@ -31,8 +31,8 @@ const rtTargetarrArr = (id) => {
...
@@ -31,8 +31,8 @@ const rtTargetarrArr = (id) => {
* Store node id to targetarr
* Store node id to targetarr
*/
*/
const
saveTargetarr
=
(
valId
,
domId
)
=>
{
const
saveTargetarr
=
(
valId
,
domId
)
=>
{
cons
t
$target
=
$
(
`#
${
domId
}
`
)
le
t
$target
=
$
(
`#
${
domId
}
`
)
cons
t
targetStr
=
$target
.
attr
(
'
data-targetarr
'
)
?
$target
.
attr
(
'
data-targetarr
'
)
+
`,
${
valId
}
`
:
`
${
valId
}
`
le
t
targetStr
=
$target
.
attr
(
'
data-targetarr
'
)
?
$target
.
attr
(
'
data-targetarr
'
)
+
`,
${
valId
}
`
:
`
${
valId
}
`
$target
.
attr
(
'
data-targetarr
'
,
targetStr
)
$target
.
attr
(
'
data-targetarr
'
,
targetStr
)
}
}
...
@@ -66,9 +66,9 @@ const rtTasksTpl = ({ id, name, x, y, targetarr, isAttachment, taskType, runFlag
...
@@ -66,9 +66,9 @@ const rtTasksTpl = ({ id, name, x, y, targetarr, isAttachment, taskType, runFlag
* Get all tasks nodes
* Get all tasks nodes
*/
*/
const
tasksAll
=
()
=>
{
const
tasksAll
=
()
=>
{
cons
t
a
=
[]
le
t
a
=
[]
$
(
'
#canvas .w
'
).
each
(
function
(
idx
,
elem
)
{
$
(
'
#canvas .w
'
).
each
(
function
(
idx
,
elem
)
{
cons
t
e
=
$
(
elem
)
le
t
e
=
$
(
elem
)
a
.
push
({
a
.
push
({
id
:
e
.
attr
(
'
id
'
),
id
:
e
.
attr
(
'
id
'
),
name
:
e
.
find
(
'
.name-p
'
).
text
(),
name
:
e
.
find
(
'
.name-p
'
).
text
(),
...
@@ -117,10 +117,10 @@ const setSvgColor = (e, color) => {
...
@@ -117,10 +117,10 @@ const setSvgColor = (e, color) => {
* Get all node ids
* Get all node ids
*/
*/
const
allNodesId
=
()
=>
{
const
allNodesId
=
()
=>
{
cons
t
idArr
=
[]
le
t
idArr
=
[]
$
(
'
.w
'
).
each
((
i
,
o
)
=>
{
$
(
'
.w
'
).
each
((
i
,
o
)
=>
{
cons
t
$obj
=
$
(
o
)
le
t
$obj
=
$
(
o
)
cons
t
$span
=
$obj
.
find
(
'
.name-p
'
).
text
()
le
t
$span
=
$obj
.
find
(
'
.name-p
'
).
text
()
if
(
$span
)
{
if
(
$span
)
{
idArr
.
push
({
idArr
.
push
({
id
:
$obj
.
attr
(
'
id
'
),
id
:
$obj
.
attr
(
'
id
'
),
...
...
dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
浏览文件 @
c1e6218e
...
@@ -120,7 +120,7 @@ export default {
...
@@ -120,7 +120,7 @@ export default {
* object {}
* object {}
*/
*/
addTasks
(
state
,
payload
)
{
addTasks
(
state
,
payload
)
{
cons
t
i
=
_
.
findIndex
(
state
.
tasks
,
v
=>
v
.
id
===
payload
.
id
)
le
t
i
=
_
.
findIndex
(
state
.
tasks
,
v
=>
v
.
id
===
payload
.
id
)
if
(
i
!==
-
1
)
{
if
(
i
!==
-
1
)
{
state
.
tasks
[
i
]
=
Object
.
assign
(
state
.
tasks
[
i
],
{},
payload
)
state
.
tasks
[
i
]
=
Object
.
assign
(
state
.
tasks
[
i
],
{},
payload
)
}
else
{
}
else
{
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
}
else
{
}
else
{
state
.
cacheTasks
[
payload
.
id
]
=
payload
state
.
cacheTasks
[
payload
.
id
]
=
payload
}
}
cons
t
dom
=
$
(
`#
${
payload
.
id
}
`
)
le
t
dom
=
$
(
`#
${
payload
.
id
}
`
)
state
.
locations
[
payload
.
id
]
=
_
.
assign
(
state
.
locations
[
payload
.
id
],
{
state
.
locations
[
payload
.
id
]
=
_
.
assign
(
state
.
locations
[
payload
.
id
],
{
name
:
dom
.
find
(
'
.name-p
'
).
text
(),
name
:
dom
.
find
(
'
.name-p
'
).
text
(),
targetarr
:
dom
.
attr
(
'
data-targetarr
'
),
targetarr
:
dom
.
attr
(
'
data-targetarr
'
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录