Browse Source

dd branch flow node verification

pull/3/MERGE
break60 5 years ago committed by gaojun2048
parent
commit
55e232db84
  1. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss
  2. 17
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  3. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
  4. 4
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
  5. 3
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  6. 3
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss

@ -135,7 +135,7 @@
width: 36px;
height: 36px;
float: left;
margin-bottom: 11px;
margin-bottom: 8px;
border-radius: 3px;
.disabled {
.icos {

17
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue

@ -326,6 +326,7 @@
* Storage interface
*/
_save (sourceType) {
if(this._verifConditions()) {
return new Promise((resolve, reject) => {
this.spinnerLoading = true
// Storage store
@ -365,6 +366,22 @@
}
})
})
}
},
_verifConditions () {
let tasks = this.$store.state.dag.tasks
let bool = true
tasks.map(v=>{
if(v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] =='' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] =='' || v.conditionResult.failedNode[0] == null)) {
bool = false
return false
}
})
if(!bool) {
this.$message.warning(`${i18n.$t('Successful branch flow and failed branch flow are required')}`)
return false
}
return true
},
/**
* Global parameter

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue

@ -470,7 +470,7 @@
this.$message.warning(`${i18n.$t('Please enter name (required)')}`)
return false
}
if (this.successBranch !='' && this.successBranch == this.failedBranch) {
if (this.successBranch !='' && this.successBranch !=null && this.successBranch == this.failedBranch) {
this.$message.warning(`${i18n.$t('Cannot select the same node for successful branch flow and failed branch flow')}`)
return false
}

4
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue

@ -128,10 +128,6 @@
this.store.dispatch('dag/getProcessTasksList', { processDefinitionId: ids }).then(res => {
resolve(['ALL'].concat(_.map(res, v => v.name)))
})
} else {
this.store.dispatch('dag/getTaskListDefIdAll', { processDefinitionIdList: ids }).then(res => {
resolve(res)
})
}
})
},

3
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -568,5 +568,6 @@ export default {
'All Columns': 'All Columns',
'Some Columns': 'Some Columns',
'Branch flow': 'Branch flow',
'Cannot select the same node for successful branch flow and failed branch flow': 'Cannot select the same node for successful branch flow and failed branch flow'
'Cannot select the same node for successful branch flow and failed branch flow': 'Cannot select the same node for successful branch flow and failed branch flow',
'Successful branch flow and failed branch flow are required': 'Successful branch flow and failed branch flow are required'
}

3
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -568,5 +568,6 @@ export default {
'All Columns': '全表导入',
'Some Columns': '选择列',
'Branch flow': '分支流转',
'Cannot select the same node for successful branch flow and failed branch flow': '成功分支流转和失败分支流转不能选择同一个节点'
'Cannot select the same node for successful branch flow and failed branch flow': '成功分支流转和失败分支流转不能选择同一个节点',
'Successful branch flow and failed branch flow are required': '成功分支流转和失败分支流转必填',
}

Loading…
Cancel
Save