From f164445876b10394e1b74e4d7ef86b26963042ae Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Fri, 15 May 2020 17:13:34 +0800 Subject: [PATCH 1/2] Conditional judgment adds text --- .../src/js/conf/home/pages/dag/_source/dag.vue | 2 ++ .../home/pages/dag/_source/plugIn/jsPlumbHandle.js | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue index 5025bd596d..cabe50cd56 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue @@ -180,6 +180,7 @@ ], Connector: 'Bezier', PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style + HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3}, ConnectionOverlays: [ [ 'Arrow', @@ -617,6 +618,7 @@ ], Connector: 'Bezier', PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style + HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3}, ConnectionOverlays: [ [ 'Arrow', 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 79c9da7033..880ea94a32 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 @@ -752,21 +752,26 @@ JSP.prototype.jspBackfill = function ({ connects, locations, largeJson }) { source: sourceId, target: targetId, type: 'basic', - paintStyle: { strokeWidth: 2, stroke: '#4caf50' } + paintStyle: { strokeWidth: 2, stroke: '#4caf50' }, + HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3}, + overlays:[["Label", { label: $t('success'), location:0.5, id:"label"} ]] }) } else if($(`#${sourceId}`).attr('data-tasks-type') === 'CONDITIONS' && $(`#${sourceId}`).attr('data-failednode') === $(`#${targetId}`).find('.name-p').text()) { this.JspInstance.connect({ source: sourceId, target: targetId, type: 'basic', - paintStyle: { strokeWidth: 2, stroke: '#f14343' } + paintStyle: { strokeWidth: 2, stroke: '#f14343' }, + HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3}, + overlays:[["Label", { label: $t('failed'), location:0.5, id:"label"} ]] }) } else { this.JspInstance.connect({ source: sourceId, target: targetId, type: 'basic', - paintStyle: { strokeWidth: 2, stroke: '#2d8cf0' } + paintStyle: { strokeWidth: 2, stroke: '#2d8cf0' }, + HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3} }) } }) From 78bd5797faab09c3b604af3a3e24d318d36a16f4 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Fri, 15 May 2020 17:20:42 +0800 Subject: [PATCH 2/2] fix --- .../js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 880ea94a32..180dbf372e 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 @@ -754,7 +754,7 @@ JSP.prototype.jspBackfill = function ({ connects, locations, largeJson }) { type: 'basic', paintStyle: { strokeWidth: 2, stroke: '#4caf50' }, HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3}, - overlays:[["Label", { label: $t('success'), location:0.5, id:"label"} ]] + overlays:[["Label", { label: i18n.$t('success'), location:0.5, id:"label"} ]] }) } else if($(`#${sourceId}`).attr('data-tasks-type') === 'CONDITIONS' && $(`#${sourceId}`).attr('data-failednode') === $(`#${targetId}`).find('.name-p').text()) { this.JspInstance.connect({ @@ -763,7 +763,7 @@ JSP.prototype.jspBackfill = function ({ connects, locations, largeJson }) { type: 'basic', paintStyle: { strokeWidth: 2, stroke: '#f14343' }, HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3}, - overlays:[["Label", { label: $t('failed'), location:0.5, id:"label"} ]] + overlays:[["Label", { label: i18n.$t('failed'), location:0.5, id:"label"} ]] }) } else { this.JspInstance.connect({