diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
index 682dd5b51a..e05de8e880 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
@@ -121,6 +121,7 @@
@@ -128,6 +129,7 @@
@@ -136,6 +138,7 @@
@@ -167,6 +170,7 @@
@@ -174,6 +178,7 @@
@@ -181,6 +186,7 @@
@@ -248,6 +254,8 @@
resourcesList: [],
// dependence
dependence: {},
+ // cache dependence
+ cacheDependence: {},
// Current node params data
params: {},
// Running sign
@@ -283,6 +291,12 @@
_onDependent (o) {
this.dependence = Object.assign(this.dependence, {}, o)
},
+ /**
+ * cache dependent
+ */
+ _onCacheDependent (o) {
+ this.cacheDependence = Object.assign(this.cacheDependence, {}, o)
+ },
/**
* Task timeout alarm
*/
@@ -356,9 +370,10 @@
type: this.taskType,
id: this.id,
name: this.name,
+ params: this.params,
description: this.description,
runFlag: this.runFlag,
- dependence: this.dependence,
+ dependence: this.cacheDependence,
maxRetryTimes: this.maxRetryTimes,
retryInterval: this.retryInterval,
timeout: this.timeout,
@@ -522,6 +537,7 @@
this.params = o.params || {}
this.dependence = o.dependence || {}
+ this.cacheDependence = o.dependence || {}
}
this.isContentBox = true
@@ -551,7 +567,7 @@
name: this.name,
description: this.description,
runFlag: this.runFlag,
- dependence: this.dependence,
+ dependence: this.cacheDependence,
maxRetryTimes: this.maxRetryTimes,
retryInterval: this.retryInterval,
timeout: this.timeout,
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
index cca9ec7003..79d127a108 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
@@ -131,6 +131,9 @@
setTimeout(() => {
this.isLoading = false
}, 600)
+ },
+ cacheDependence (val) {
+ this.$emit('on-cache-dependent', val)
}
},
beforeCreate () {
@@ -151,7 +154,19 @@
},
destroyed () {
},
- computed: {},
+ computed: {
+ cacheDependence () {
+ return {
+ relation: this.relation,
+ dependTaskList: _.map(this.dependTaskList, v => {
+ return {
+ relation: v.relation,
+ dependItemList: _.map(v.dependItemList, v1 => _.omit(v1, ['depTasksList', 'state', 'dateValueList']))
+ }
+ })
+ }
+ }
+ },
components: { mListBox, mDependItemList }
}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
index f0d69ec420..03e53fe5e5 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
@@ -379,7 +379,7 @@
// Non-null objects represent backfill
if (!_.isEmpty(o)) {
this.mainClass = o.params.mainClass || ''
- this.mainJar = o.params.mainJar.res || ''
+ this.mainJar = o.params.mainJar && o.params.mainJar.res ? o.params.mainJar.res : ''
this.deployMode = o.params.deployMode || ''
this.slot = o.params.slot || 1
this.taskManager = o.params.taskManager || '2'
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue
index fa73e9bb89..706a35f4fe 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue
@@ -91,6 +91,7 @@
@@ -127,6 +128,8 @@
mainJarList: [],
// Resource(list)
resourceList: [],
+ // Cache ResourceList
+ cacheResourceList: [],
// Custom parameter
localParams: [],
// Command line argument
@@ -156,6 +159,12 @@
_onResourcesData (a) {
this.resourceList = a
},
+ /**
+ * cache resourceList
+ */
+ _onCacheResourcesData (a) {
+ this.cacheResourceList = a
+ },
/**
* verification
*/
@@ -220,6 +229,25 @@
if (type === 'PYTHON') {
this.mainClass = ''
}
+ },
+ //Watch the cacheParams
+ cacheParams (val) {
+ this.$emit('on-cache-params', val);
+ }
+ },
+ computed: {
+ cacheParams () {
+ return {
+ mainClass: this.mainClass,
+ mainJar: {
+ res: this.mainJar
+ },
+ resourceList: this.cacheResourceList,
+ localParams: this.localParams,
+ mainArgs: this.mainArgs,
+ others: this.others,
+ programType: this.programType
+ }
}
},
created () {
@@ -238,6 +266,7 @@
let resourceList = o.params.resourceList || []
if (resourceList.length) {
this.resourceList = resourceList
+ this.cacheResourceList = resourceList
}
// backfill localParams
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue
index d55f18a2cc..e84f37d7a9 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue
@@ -70,7 +70,9 @@
// Data source type
type: '',
// data source
- datasource: ''
+ datasource: '',
+ // Return to the selected data source
+ rtDatasource: ''
}
},
mixins: [disabledState],
@@ -83,7 +85,7 @@
*/
_onDsData (o) {
this.type = o.type
- this.datasource = o.datasource
+ this.rtDatasource = o.datasource
},
/**
* return udp
@@ -112,14 +114,29 @@
// storage
this.$emit('on-params', {
type: this.type,
- datasource: this.datasource,
+ datasource: this.rtDatasource,
method: this.method,
localParams: this.localParams
})
return true
}
},
- watch: {},
+ watch: {
+ //Watch the cacheParams
+ cacheParams (val) {
+ this.$emit('on-cache-params', val);
+ }
+ },
+ computed: {
+ cacheParams () {
+ return {
+ type: this.type,
+ datasource: this.rtDatasource,
+ method: this.method,
+ localParams: this.localParams
+ }
+ }
+ },
created () {
let o = this.backfillItem
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
index 39a7cd858b..e565b4a6bd 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
@@ -31,6 +31,7 @@
@@ -69,7 +70,9 @@
// Custom parameter
localParams: [],
// resource(list)
- resourceList: []
+ resourceList: [],
+ // Cache ResourceList
+ cacheResourceList: []
}
},
mixins: [disabledState],
@@ -89,6 +92,12 @@
_onResourcesData (a) {
this.resourceList = a
},
+ /**
+ * cache resourceList
+ */
+ _onCacheResourcesData (a) {
+ this.cacheResourceList = a
+ },
/**
* verification
*/
@@ -142,18 +151,33 @@
return editor
}
},
- watch: {},
+ watch: {
+ //Watch the cacheParams
+ cacheParams (val) {
+ this.$emit('on-cache-params', val);
+ }
+ },
+ computed: {
+ cacheParams () {
+ return {
+ resourceList: this.cacheResourceList,
+ localParams: this.localParams,
+ rawScript: editor ? editor.getValue() : ''
+ }
+ }
+ },
created () {
let o = this.backfillItem
// Non-null objects represent backfill
if (!_.isEmpty(o)) {
- this.rawScript = o.params.rawScript
+ this.rawScript = o.params.rawScript || ''
// backfill resourceList
let resourceList = o.params.resourceList || []
if (resourceList.length) {
this.resourceList = resourceList
+ this.cacheResourceList = resourceList
}
// backfill localParams
@@ -174,4 +198,4 @@
},
components: { mLocalParams, mListBox, mResources }
}
-
\ No newline at end of file
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
index 17184eed75..ad40c586b9 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
@@ -37,6 +37,7 @@
@@ -75,7 +76,9 @@
// Custom parameter
localParams: [],
// resource(list)
- resourceList: []
+ resourceList: [],
+ // Cache ResourceList
+ cacheResourceList: []
}
},
mixins: [disabledState],
@@ -119,11 +122,17 @@
},
/**
* return resourceList
- *
+ *
*/
_onResourcesData (a) {
this.resourceList = a
},
+ /**
+ * cache resourceList
+ */
+ _onCacheResourcesData (a) {
+ this.cacheResourceList = a
+ },
/**
* verification
*/
@@ -175,18 +184,33 @@
return editor
}
},
- watch: {},
+ watch: {
+ //Watch the cacheParams
+ cacheParams (val) {
+ this.$emit('on-cache-params', val);
+ }
+ },
+ computed: {
+ cacheParams () {
+ return {
+ resourceList: this.cacheResourceList,
+ localParams: this.localParams,
+ rawScript: editor ? editor.getValue() : ''
+ }
+ }
+ },
created () {
let o = this.backfillItem
// Non-null objects represent backfill
if (!_.isEmpty(o)) {
- this.rawScript = o.params.rawScript
+ this.rawScript = o.params.rawScript || ''
// backfill resourceList
let resourceList = o.params.resourceList || []
if (resourceList.length) {
this.resourceList = resourceList
+ this.cacheResourceList = resourceList
}
// backfill localParams
@@ -229,5 +253,5 @@
right: -12px;
top: -16px;
}
-
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
index 66a89a4944..feef19856c 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
@@ -412,7 +412,7 @@
// Non-null objects represent backfill
if (!_.isEmpty(o)) {
this.mainClass = o.params.mainClass || ''
- this.mainJar = o.params.mainJar.res || ''
+ this.mainJar = o.params.mainJar && o.params.mainJar.res ? o.params.mainJar.res : ''
this.deployMode = o.params.deployMode || ''
this.driverCores = o.params.driverCores || 1
this.driverMemory = o.params.driverMemory || '512M'
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue
index ee03513249..477038f18f 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue
@@ -86,7 +86,13 @@
return _.filter(this.processDefinitionList, v => id === v.id)[0].code
}
},
- watch: {},
+ watch: {
+ wdiCurr (val) {
+ this.$emit('on-cache-params', {
+ processDefinitionId: this.wdiCurr
+ })
+ }
+ },
created () {
let processListS = _.cloneDeep(this.store.state.dag.processListS)
let id = this.router.history.current.params.id || null
@@ -115,4 +121,4 @@
mounted () {
}
}
-
\ No newline at end of file
+