From 05a0d3892a514a0ed2764d894272e35e606b1496 Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Thu, 21 May 2020 18:55:57 +0800 Subject: [PATCH] Worker group adds check (#2787) * Worker group adds check * fix --- .../pages/dag/_source/formModel/formModel.vue | 17 +++++++++++++++-- .../src/js/module/i18n/locale/en_US.js | 3 ++- .../src/js/module/i18n/locale/zh_CN.js | 3 ++- 3 files changed, 19 insertions(+), 4 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 459f9a8605..b079e941fe 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 @@ -484,6 +484,16 @@ } return true }, + _verifWorkGroup() { + let item = this.store.state.security.workerGroupsListAll.find(item => { + return item.id == this.workerGroup; + }); + if(item==undefined) { + this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`) + return false; + } + return true + }, /** * Global verification procedure */ @@ -492,6 +502,10 @@ if (!this._verifName()) { return } + // verif workGroup + if(!this._verifWorkGroup()) { + return + } // Verify task alarm parameters if (!this.$refs['timeout']._verification()) { return @@ -619,8 +633,7 @@ break; } } - - if(!hasMatch){ + if(!hasMatch && o.workerGroupId!=undefined){ this.workerGroup = 'default' } else { this.workerGroup = o.workerGroup diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js index 678acb1283..fdb897fc9c 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js @@ -592,5 +592,6 @@ export default { 'Cannot select the same node for successful branch flow and failed branch flow': 'Cannot select the same node for successful branch flow and failed branch flow', 'Successful branch flow and failed branch flow are required': 'conditions node Successful and failed branch flow are required', 'Unauthorized or deleted resources': 'Unauthorized or deleted resources', - 'Please delete all non-existent resources': 'Please delete all non-existent resources' + 'Please delete all non-existent resources': 'Please delete all non-existent resources', + 'The Worker group no longer exists, please select the correct Worker group!': 'The Worker group no longer exists, please select the correct Worker group!' } diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js index 628ee6151e..2cdf09db7b 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js @@ -592,5 +592,6 @@ export default { 'Cannot select the same node for successful branch flow and failed branch flow': '成功分支流转和失败分支流转不能选择同一个节点', 'Successful branch flow and failed branch flow are required': 'conditions节点成功和失败分支流转必填', 'Unauthorized or deleted resources': '未授权或已删除资源', - 'Please delete all non-existent resources': '请删除所有未授权或已删除资源' + 'Please delete all non-existent resources': '请删除所有未授权或已删除资源', + 'The Worker group no longer exists, please select the correct Worker group!': '该Worker分组已经不存在,请选择正确的Worker分组!' }