mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-01 19:58:29 +08:00
dag connection add check
This commit is contained in:
parent
19fb2fdd9c
commit
ba43c8c3f7
@ -51,12 +51,7 @@ const config = merge.smart(baseConfig, {
|
|||||||
minimizer: [
|
minimizer: [
|
||||||
new TerserPlugin({
|
new TerserPlugin({
|
||||||
terserOptions: {
|
terserOptions: {
|
||||||
compress: {
|
compress: {}
|
||||||
warnings: false,
|
|
||||||
drop_console: true,
|
|
||||||
drop_debugger: true,
|
|
||||||
pure_funcs: ['console.log']
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
cache: true,
|
cache: true,
|
||||||
parallel: true,
|
parallel: true,
|
||||||
|
@ -36,7 +36,7 @@ import {
|
|||||||
} from './util'
|
} from './util'
|
||||||
import mStart from '@/conf/home/pages/projects/pages/definition/pages/list/_source/start'
|
import mStart from '@/conf/home/pages/projects/pages/definition/pages/list/_source/start'
|
||||||
|
|
||||||
const JSP = function () {
|
let JSP = function () {
|
||||||
this.dag = {}
|
this.dag = {}
|
||||||
this.selectedElement = {}
|
this.selectedElement = {}
|
||||||
|
|
||||||
@ -687,8 +687,17 @@ JSP.prototype.saveStore = function () {
|
|||||||
|
|
||||||
JSP.prototype.handleEvent = function () {
|
JSP.prototype.handleEvent = function () {
|
||||||
this.JspInstance.bind('beforeDrop', function (info) {
|
this.JspInstance.bind('beforeDrop', function (info) {
|
||||||
|
console.log(info)
|
||||||
let sourceId = info['sourceId']// 出
|
let sourceId = info['sourceId']// 出
|
||||||
let targetId = info['targetId']// 入
|
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
|
* 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 }) {
|
JSP.prototype.jspBackfill = function ({ connects, locations, largeJson }) {
|
||||||
// Backfill nodes
|
// Backfill nodes
|
||||||
|
@ -34,6 +34,7 @@ const saveTargetarr = (valId, domId) => {
|
|||||||
let $target = $(`#${domId}`)
|
let $target = $(`#${domId}`)
|
||||||
let targetStr = $target.attr('data-targetarr') ? $target.attr('data-targetarr') + `,${valId}` : `${valId}`;
|
let targetStr = $target.attr('data-targetarr') ? $target.attr('data-targetarr') + `,${valId}` : `${valId}`;
|
||||||
$target.attr('data-targetarr', targetStr)
|
$target.attr('data-targetarr', targetStr)
|
||||||
|
console.log(targetStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
const rtBantpl = () => {
|
const rtBantpl = () => {
|
||||||
|
@ -600,5 +600,6 @@ export default {
|
|||||||
'Directory detail': 'Directory detail',
|
'Directory detail': 'Directory detail',
|
||||||
'Connection name': 'Connection name',
|
'Connection name': 'Connection name',
|
||||||
'Current connection settings': 'Current connection settings',
|
'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'
|
||||||
}
|
}
|
||||||
|
@ -606,5 +606,6 @@ export default {
|
|||||||
'Directory detail': '查看目录详情',
|
'Directory detail': '查看目录详情',
|
||||||
'Connection name': '连线名',
|
'Connection name': '连线名',
|
||||||
'Current connection settings': '当前连线设置',
|
'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': '此画布异常,无法进行节点连线,请保存或退出当前工作流'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user