Browse Source

fix conflict pr 6997 (#7571)

Co-authored-by: shangeyao <sgy960921>
3.0.0/version-upgrade
Assert 3 years ago committed by GitHub
parent
commit
e172015cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/DependentTaskProcessor.java
  2. 11
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  3. 8
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
  4. 7
      dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
  5. 8
      dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
  6. 3
      dolphinscheduler-ui/src/js/conf/home/store/dag/state.js

1
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/DependentTaskProcessor.java

@ -69,7 +69,6 @@ public class DependentTaskProcessor extends BaseTaskProcessor {
DependResult result;
ProcessInstance processInstance;
TaskDefinition taskDefinition;
private MasterConfig masterConfig = SpringApplicationContext.getBean(MasterConfig.class);;

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

@ -226,7 +226,8 @@
'setIsEditDag',
'setName',
'setLocations',
'resetLocalParam'
'resetLocalParam',
'setDependResult'
]),
/**
* Toggle full screen
@ -562,6 +563,7 @@
.then((res) => {
this.$message(this.$t('Refresh status succeeded'))
const { taskList } = res.data
const list = res.list
if (taskList) {
this.taskInstances = taskList
taskList.forEach((taskInstance) => {
@ -572,6 +574,13 @@
})
})
}
if (list) {
list.forEach((dependent) => {
if (dependent.dependentResult) {
this.setDependResult(JSON.parse(dependent.dependentResult))
}
})
}
})
.finally(() => {
this.loading(false)

8
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue

@ -65,6 +65,7 @@
import mListBox from './_source/listBox'
import mDependItemList from './_source/dependItemList'
import disabledState from '@/module/mixin/disabledState'
import { mapState } from 'vuex'
export default {
name: 'dependent',
@ -140,7 +141,7 @@
},
created () {
let o = this.backfillItem
let dependentResult = $(`#${o.id}`).data('dependent-result') || {}
let dependentResult = this.dependResult || {}
// Does not represent an empty object backfill
if (!_.isEmpty(o)) {
this.relation = _.cloneDeep(o.dependence.relation) || 'AND'
@ -148,7 +149,7 @@
let defaultState = this.isDetails ? 'WAITING' : ''
// Process instance return status display matches by key
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => {
v1.state = dependentResult[`${v1.definitionId}-${v1.depTaskCode}-${v1.cycle}-${v1.dateValue}`] || defaultState
v1.state = dependentResult[`${v1.definitionCode}-${v1.depTaskCode}-${v1.cycle}-${v1.dateValue}`] || defaultState
}))
}
},
@ -157,6 +158,9 @@
destroyed () {
},
computed: {
...mapState('dag', [
'dependResult'
]),
cacheDependent () {
return {
relation: this.relation,

7
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js

@ -37,6 +37,13 @@ export default {
io.get(`projects/${state.projectCode}/process-instances/${payload}/tasks`, {
processInstanceId: payload
}, res => {
res.list = _.map(res.data.taskList, v => {
return _.cloneDeep({
code: v.taskCode,
taskType: v.taskType,
dependentResult: v.dependentResult
})
})
state.taskInstances = res.data.taskList
resolve(res)
}).catch(e => {

8
dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js

@ -110,6 +110,13 @@ export default {
state.isDetails = payload
},
/**
* set depend result
*/
setDependResult (state, payload) {
state.dependResult = Object.assign(state.dependResult, {}, payload)
},
/**
* reset params
*/
@ -129,6 +136,7 @@ export default {
state.runFlag = (payload && payload.runFlag) || ''
state.locations = (payload && payload.locations) || {}
state.connects = (payload && payload.connects) || []
state.dependResult = (payload && payload.dependResult) || {}
},
/**
* add task

3
dolphinscheduler-ui/src/js/conf/home/store/dag/state.js

@ -122,5 +122,6 @@ export default {
// Operating state
isDetails: false,
startup: {},
taskInstances: []
taskInstances: [],
dependResult: {}
}

Loading…
Cancel
Save