Browse Source

[Feature-#5565][UI] Global Param passed by sense dependencies (#5628)

* modify-globalParams

* del comment

Co-authored-by: liangfengjie <liangfengjie@hetao101.com>
2.0.7-release
myangle1120 4 years ago committed by GitHub
parent
commit
a7682143ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  2. 5
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js
  3. 32
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue

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

@ -388,7 +388,7 @@
taskList.forEach(item => {
if (item.name === v1.name) {
depState = item.state
const params = item.taskJson ? JSON.parse(item.taskJson).params : ''
const params = item.taskParams ? JSON.parse(item.taskParams) : ''
let localParam = params.localParams || []
newTask.push({
id: v2.id,

5
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js

@ -209,6 +209,11 @@ const typeList = [
id: 9,
code: 'BOOLEAN',
disabled: false
},
{
id: 10,
code: 'LIST',
disabled: false
}
]

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

@ -202,38 +202,8 @@
*/
reloadParam () {
const dag = _.cloneDeep(this.store.state.dag)
let fixedParam = []
const tasks = this.store.state.dag.tasks
for (const task of tasks) {
const localParam = task.params ? task.params.localParams : []
localParam.forEach(l => {
if (!fixedParam.some(f => { return f.prop === l.prop })) {
fixedParam.push(Object.assign({
ifFixed: true
}, l))
}
})
}
let globalParams = _.cloneDeep(dag.globalParams)
globalParams = globalParams.map(g => {
if (fixedParam.some(f => { return g.prop === f.prop })) {
fixedParam = fixedParam.filter(f => { return g.prop !== f.prop })
return Object.assign(g, {
ifFixed: true
})
} else {
return g
}
})
let udpList = [...fixedParam, ...globalParams].sort(s => {
if (s.ifFixed) {
return -1
} else {
return 1
}
})
let udpList = [...globalParams]
this.udpList = udpList
this.udpListCache = udpList
}

Loading…
Cancel
Save