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 bca4eec63691733508c2db5a12607c898f702c5d..43ed9a1b59aa8b18ffa8a28c667e1cbf512287bf 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 @@ -152,12 +152,14 @@ @@ -511,6 +513,8 @@ this.workerGroupId = o.workerGroupId } + this.params = o.params || {}; + } this.isContentBox = true }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue index 64543fcbc13f9a2f877cc970c5000efb965842b0..8b578c770b8f01edc50902f9e1913b15fc8775fb 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/resources.vue @@ -66,6 +66,13 @@ // Listening data source resourceList (a) { this.value = _.map(_.cloneDeep(a), v => v.res) + }, + value (val) { + this.$emit('on-cache-resourcesData', _.map(val, v => { + return { + res: v + } + })) } }, created () { 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 a71c8d729fb9c51411756e7bd92f544ff5a3517d..f0d69ec4200fedf3f12a7687a8b9b2346eeadc9b 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 @@ -154,6 +154,7 @@ @@ -193,6 +194,8 @@ deployMode: 'cluster', // Resource(list) resourceList: [], + // Cache ResourceList + cacheResourceList: [], // Custom function localParams: [], // Driver Number of cores @@ -232,6 +235,12 @@ _onResourcesData (a) { this.resourceList = a }, + /** + * cache resourceList + */ + _onCacheResourcesData (a) { + this.cacheResourceList = a + }, /** * verification */ @@ -336,6 +345,31 @@ 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 + }, + deployMode: this.deployMode, + resourceList: this.cacheResourceList, + localParams: this.localParams, + slot: this.slot, + taskManager: this.taskManager, + jobManagerMemory: this.jobManagerMemory, + taskManagerMemory: this.taskManagerMemory, + executorCores: this.executorCores, + mainArgs: this.mainArgs, + others: this.others, + programType: this.programType + } } }, created () { @@ -360,6 +394,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/spark.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue index 2457a23faa09d74bea19af31471f91db19a6cb92..66a89a4944bbc765dfe3e58072f02b278043b835 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 @@ -182,6 +182,7 @@ @@ -221,6 +222,8 @@ deployMode: 'cluster', // Resource(list) resourceList: [], + // Cache ResourceList + cacheResourceList: [], // Custom function localParams: [], // Driver Number of cores @@ -264,6 +267,12 @@ _onResourcesData (a) { this.resourceList = a }, + /** + * cache resourceList + */ + _onCacheResourcesData (a) { + this.cacheResourceList = a + }, /** * verification */ @@ -368,6 +377,32 @@ 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 + }, + deployMode: this.deployMode, + resourceList: this.cacheResourceList, + localParams: this.localParams, + driverCores: this.driverCores, + driverMemory: this.driverMemory, + numExecutors: this.numExecutors, + executorMemory: this.executorMemory, + executorCores: this.executorCores, + mainArgs: this.mainArgs, + others: this.others, + programType: this.programType, + sparkVersion: this.sparkVersion + } } }, created () { @@ -393,6 +428,7 @@ let resourceList = o.params.resourceList || [] if (resourceList.length) { this.resourceList = resourceList + this.cacheResourceList = resourceList } // backfill localParams