|
|
@ -184,6 +184,7 @@ |
|
|
|
<m-http |
|
|
|
<m-http |
|
|
|
v-if="taskType === 'HTTP'" |
|
|
|
v-if="taskType === 'HTTP'" |
|
|
|
@on-params="_onParams" |
|
|
|
@on-params="_onParams" |
|
|
|
|
|
|
|
@on-cache-params="_onCacheParams" |
|
|
|
ref="HTTP" |
|
|
|
ref="HTTP" |
|
|
|
:backfill-item="backfillItem"> |
|
|
|
:backfill-item="backfillItem"> |
|
|
|
</m-http> |
|
|
|
</m-http> |
|
|
@ -333,6 +334,31 @@ |
|
|
|
_onParams (o) { |
|
|
|
_onParams (o) { |
|
|
|
this.params = Object.assign(this.params, {}, o) |
|
|
|
this.params = Object.assign(this.params, {}, o) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_onCacheParams (o) { |
|
|
|
|
|
|
|
this.params = Object.assign(this.params, {}, o) |
|
|
|
|
|
|
|
this._cacheItem() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_cacheItem () { |
|
|
|
|
|
|
|
this.$emit('cacheTaskInfo', { |
|
|
|
|
|
|
|
item: { |
|
|
|
|
|
|
|
type: this.taskType, |
|
|
|
|
|
|
|
id: this.id, |
|
|
|
|
|
|
|
name: this.name, |
|
|
|
|
|
|
|
params: this.params, |
|
|
|
|
|
|
|
description: this.description, |
|
|
|
|
|
|
|
runFlag: this.runFlag, |
|
|
|
|
|
|
|
dependence: this.dependence, |
|
|
|
|
|
|
|
maxRetryTimes: this.maxRetryTimes, |
|
|
|
|
|
|
|
retryInterval: this.retryInterval, |
|
|
|
|
|
|
|
timeout: this.timeout, |
|
|
|
|
|
|
|
taskInstancePriority: this.taskInstancePriority, |
|
|
|
|
|
|
|
workerGroupId: this.workerGroupId |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
fromThis: this |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
/** |
|
|
|
/** |
|
|
|
* verification name |
|
|
|
* verification name |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -431,14 +457,26 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Watch the item change, cache the value it changes |
|
|
|
|
|
|
|
**/ |
|
|
|
|
|
|
|
_item (val) { |
|
|
|
|
|
|
|
this._cacheItem() |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
created () { |
|
|
|
// Unbind copy and paste events |
|
|
|
// Unbind copy and paste events |
|
|
|
JSP.removePaste() |
|
|
|
JSP.removePaste() |
|
|
|
// Backfill data |
|
|
|
// Backfill data |
|
|
|
let taskList = this.store.state.dag.tasks |
|
|
|
let taskList = this.store.state.dag.tasks |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//fillback use cacheTasks |
|
|
|
|
|
|
|
let cacheTasks = this.store.state.dag.cacheTasks |
|
|
|
let o = {} |
|
|
|
let o = {} |
|
|
|
|
|
|
|
if (cacheTasks[this.id]) { |
|
|
|
|
|
|
|
o = cacheTasks[this.id] |
|
|
|
|
|
|
|
this.backfillItem = cacheTasks[this.id] |
|
|
|
|
|
|
|
} else { |
|
|
|
if (taskList.length) { |
|
|
|
if (taskList.length) { |
|
|
|
taskList.forEach(v => { |
|
|
|
taskList.forEach(v => { |
|
|
|
if (v.id === this.id) { |
|
|
|
if (v.id === this.id) { |
|
|
@ -446,6 +484,8 @@ |
|
|
|
this.backfillItem = v |
|
|
|
this.backfillItem = v |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// Non-null objects represent backfill |
|
|
|
// Non-null objects represent backfill |
|
|
|
if (!_.isEmpty(o)) { |
|
|
|
if (!_.isEmpty(o)) { |
|
|
|
this.name = o.name |
|
|
|
this.name = o.name |
|
|
@ -472,7 +512,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.isContentBox = true |
|
|
|
this.isContentBox = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
@ -490,6 +529,23 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
_isGoSubProcess () { |
|
|
|
_isGoSubProcess () { |
|
|
|
return this.taskType === 'SUB_PROCESS' && this.name |
|
|
|
return this.taskType === 'SUB_PROCESS' && this.name |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Define the item model |
|
|
|
|
|
|
|
_item () { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: this.taskType, |
|
|
|
|
|
|
|
id: this.id, |
|
|
|
|
|
|
|
name: this.name, |
|
|
|
|
|
|
|
description: this.description, |
|
|
|
|
|
|
|
runFlag: this.runFlag, |
|
|
|
|
|
|
|
dependence: this.dependence, |
|
|
|
|
|
|
|
maxRetryTimes: this.maxRetryTimes, |
|
|
|
|
|
|
|
retryInterval: this.retryInterval, |
|
|
|
|
|
|
|
timeout: this.timeout, |
|
|
|
|
|
|
|
taskInstancePriority: this.taskInstancePriority, |
|
|
|
|
|
|
|
workerGroupId: this.workerGroupId |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
|