From 843493804d347e9732ddf7c7dd66e8d5ae0a9d77 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Tue, 26 Jan 2021 10:12:03 +0800 Subject: [PATCH 1/3] [fixbug-4570][ui] When deleting a workflow connection, all connections disappear --- .../conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js index 0037af68b6..e3e6a1feeb 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js @@ -627,6 +627,7 @@ JSP.prototype.saveStore = function () { tasks.push(tasksParam) } }) + console.log(store.state.dag.connects.length, this.JspInstance.getConnections().length) if (store.state.dag.connects.length === this.JspInstance.getConnections().length) { _.map(store.state.dag.connects, u => { connects.push({ @@ -658,6 +659,14 @@ JSP.prototype.saveStore = function () { label: v._jsPlumb.overlays.label.canvas.innerText }) }) + } else if (store.state.dag.connects.length > this.JspInstance.getConnections().length) { + _.map(this.JspInstance.getConnections(), v => { + connects.push({ + endPointSourceId: v.sourceId, + endPointTargetId: v.targetId, + label: v._jsPlumb.overlays.label.canvas.innerText + }) + }) } _.map(tasksAll(), v => { From b12e8a5390e913b57fce130d8f38de6af9082a36 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Tue, 26 Jan 2021 10:13:02 +0800 Subject: [PATCH 2/3] fix --- .../src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js index e3e6a1feeb..b2772db913 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js @@ -627,7 +627,7 @@ JSP.prototype.saveStore = function () { tasks.push(tasksParam) } }) - console.log(store.state.dag.connects.length, this.JspInstance.getConnections().length) + if (store.state.dag.connects.length === this.JspInstance.getConnections().length) { _.map(store.state.dag.connects, u => { connects.push({ From fdfc9ac21554be3697f1541237cc29d3311a12ed Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Tue, 26 Jan 2021 10:13:36 +0800 Subject: [PATCH 3/3] fix --- .../src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js index b2772db913..1977a92409 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js @@ -627,7 +627,7 @@ JSP.prototype.saveStore = function () { tasks.push(tasksParam) } }) - + if (store.state.dag.connects.length === this.JspInstance.getConnections().length) { _.map(store.state.dag.connects, u => { connects.push({