diff --git a/dolphinscheduler-ui/build/webpack.config.prod.js b/dolphinscheduler-ui/build/webpack.config.prod.js index 4bb90d54d1..1024ac6724 100644 --- a/dolphinscheduler-ui/build/webpack.config.prod.js +++ b/dolphinscheduler-ui/build/webpack.config.prod.js @@ -51,12 +51,7 @@ const config = merge.smart(baseConfig, { minimizer: [ new TerserPlugin({ terserOptions: { - compress: { - warnings: false, - drop_console: true, - drop_debugger: true, - pure_funcs: ['console.log'] - } + compress: {} }, cache: true, parallel: true, 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 62fe764a74..d6b01f1778 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 @@ -36,7 +36,7 @@ import { } from './util' import mStart from '@/conf/home/pages/projects/pages/definition/pages/list/_source/start' -const JSP = function () { +let JSP = function () { this.dag = {} this.selectedElement = {} @@ -687,8 +687,17 @@ JSP.prototype.saveStore = function () { JSP.prototype.handleEvent = function () { this.JspInstance.bind('beforeDrop', function (info) { + console.log(info) let sourceId = info['sourceId']// 出 let targetId = info['targetId']// 入 + console.log(sourceId,targetId) + /** + * When connecting, connection is prohibited when the sourceId and target nodes are empty + */ + if(!sourceId && !targetId) { + Vue.$message.warning(`${i18n.$t('This canvas is abnormal and the node connection cannot be made. Please save or exit the current workflow')}`) + return false + } /** * Recursive search for nodes */ @@ -730,7 +739,7 @@ JSP.prototype.handleEvent = function () { }) } /** - * Backfill data processing + * Backfill data processingJSP */ JSP.prototype.jspBackfill = function ({ connects, locations, largeJson }) { // Backfill nodes diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js index d356ff3715..65c345921d 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js @@ -34,6 +34,7 @@ const saveTargetarr = (valId, domId) => { let $target = $(`#${domId}`) let targetStr = $target.attr('data-targetarr') ? $target.attr('data-targetarr') + `,${valId}` : `${valId}`; $target.attr('data-targetarr', targetStr) + console.log(targetStr) } const rtBantpl = () => { diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js index 170ebbc38d..5f7a707f87 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js @@ -600,5 +600,6 @@ export default { 'Directory detail': 'Directory detail', 'Connection name': 'Connection name', 'Current connection settings': 'Current connection settings', - 'Please save the DAG before formatting': 'Please save the DAG before formatting' + 'Please save the DAG before formatting': 'Please save the DAG before formatting', + 'This canvas is abnormal and the node connection cannot be made. Please save or exit the current workflow': 'This canvas is abnormal and the node connection cannot be made. Please save or exit the current workflow' } diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js index 704b447b12..5dec5096b3 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js @@ -606,5 +606,6 @@ export default { 'Directory detail': '查看目录详情', 'Connection name': '连线名', 'Current connection settings': '当前连线设置', - 'Please save the DAG before formatting': '格式化前请先保存DAG' + 'Please save the DAG before formatting': '格式化前请先保存DAG', + 'This canvas is abnormal and the node connection cannot be made. Please save or exit the current workflow': '此画布异常,无法进行节点连线,请保存或退出当前工作流' }