From cbefe382f81012999b420f3f613a3e47fc6d18e6 Mon Sep 17 00:00:00 2001 From: zhukai Date: Thu, 5 Dec 2019 17:16:40 +0800 Subject: [PATCH] [dolphinscheduler-#184] [enhancement] (#1398) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When workgroup referenced by workflow , And there isn’t any instace in workflow ,the workgroup can be delete . After the workgroup delete , Use the default workgroup in the page ,Instead of the value id. --- .../pages/dag/_source/formModel/formModel.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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 976e97ede6..8cb7d4f0c2 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 @@ -369,7 +369,6 @@ } $(`#${this.id}`).find('span').text(this.name) - // Store the corresponding node data structure this.$emit('addTaskInfo', { item: { @@ -455,7 +454,23 @@ this.description = o.description this.maxRetryTimes = o.maxRetryTimes this.retryInterval = o.retryInterval - this.workerGroupId = o.workerGroupId + + // If the workergroup has been deleted, set the default workergroup + var hasMatch = false; + for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) { + var workerGroupId = this.store.state.security.workerGroupsListAll[i].id + if (o.workerGroupId == workerGroupId) { + hasMatch = true; + break; + } + } + + if(!hasMatch){ + this.workerGroupId = -1 + }else{ + this.workerGroupId = o.workerGroupId + } + } } this.isContentBox = true