Browse Source

Merge pull request #2660 from break60/dev-1.3.0

Fix conditions node save exception #2649
pull/3/MERGE
xingchun-chen 5 years ago committed by GitHub
parent
commit
36786aa9a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  2. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  3. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

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

@ -334,11 +334,11 @@
* Storage interface * Storage interface
*/ */
_save (sourceType) { _save (sourceType) {
if(this._verifConditions()) { return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => { this.spinnerLoading = true
this.spinnerLoading = true // Storage store
// Storage store Dag.saveStore().then(res => {
Dag.saveStore().then(res => { if(this._verifConditions(res.tasks)) {
if (this.urlParam.id) { if (this.urlParam.id) {
/** /**
* Edit * Edit
@ -372,12 +372,12 @@
reject(e) reject(e)
}) })
} }
}) }
}) })
} })
}, },
_verifConditions () { _verifConditions (value) {
let tasks = this.$store.state.dag.tasks let tasks = value
let bool = true let bool = true
tasks.map(v=>{ 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)) { if(v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] =='' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] =='' || v.conditionResult.failedNode[0] == null)) {
@ -387,6 +387,7 @@
}) })
if(!bool) { if(!bool) {
this.$message.warning(`${i18n.$t('Successful branch flow and failed branch flow are required')}`) this.$message.warning(`${i18n.$t('Successful branch flow and failed branch flow are required')}`)
this.spinnerLoading = false
return false return false
} }
return true return true

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

@ -588,7 +588,7 @@ export default {
'Some Columns': 'Some Columns', 'Some Columns': 'Some Columns',
'Branch flow': 'Branch flow', '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', 'Successful branch flow and failed branch flow are required': 'conditions node Successful and failed branch flow are required',
'Unauthorized or deleted resources': 'Unauthorized or deleted resources', 'Unauthorized or deleted resources': 'Unauthorized or deleted resources',
'Please delete all non-existent resources': 'Please delete all non-existent resources' 'Please delete all non-existent resources': 'Please delete all non-existent resources'
} }

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

@ -588,7 +588,7 @@ export default {
'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': '成功分支流转和失败分支流转不能选择同一个节点',
'Successful branch flow and failed branch flow are required': '成功分支流转和失败分支流转必填', 'Successful branch flow and failed branch flow are required': 'conditions节点成功和失败分支流转必填',
'Unauthorized or deleted resources': '未授权或已删除资源', 'Unauthorized or deleted resources': '未授权或已删除资源',
'Please delete all non-existent resources': '请删除所有未授权或已删除资源' 'Please delete all non-existent resources': '请删除所有未授权或已删除资源'
} }

Loading…
Cancel
Save