You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2021/11/05 13:36:53 UTC

[dolphinscheduler] branch dev updated: [Feature-#6268][UI]Serial execte proces (#6267)

This is an automated email from the ASF dual-hosted git repository.

leonbao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new b8d0f06  [Feature-#6268][UI]Serial execte proces (#6267)
b8d0f06 is described below

commit b8d0f06ad8599b7c7abb04e5895ff2c7b3580850
Author: myangle1120 <94...@qq.com>
AuthorDate: Fri Nov 5 21:36:44 2021 +0800

    [Feature-#6268][UI]Serial execte proces (#6267)
    
    * serial
    
    * del ip
---
 .../src/js/conf/home/pages/dag/_source/config.js   | 11 ++++++++
 .../src/js/conf/home/pages/dag/_source/udp/udp.vue | 30 ++++++++++++++++++++--
 .../pages/instance/pages/list/_source/list.vue     |  2 +-
 .../src/js/conf/home/store/dag/actions.js          |  7 +++++
 .../src/js/conf/home/store/dag/mutations.js        |  7 +++++
 .../src/js/conf/home/store/dag/state.js            |  2 ++
 .../src/js/module/i18n/locale/en_US.js             |  6 +++++
 .../src/js/module/i18n/locale/zh_CN.js             |  6 +++++
 8 files changed, 68 insertions(+), 3 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js
index a5695c2..d4a35e5 100755
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js
@@ -133,6 +133,10 @@ const runningType = [
   {
     desc: `${i18n.$t('Recovery waiting thread')}`,
     code: 'RECOVER_WAITING_THREAD'
+  },
+  {
+    desc: `${i18n.$t('Recover serial wait')}`,
+    code: 'RECOVER_SERIAL_WAIT'
   }
 ]
 
@@ -243,6 +247,13 @@ const tasksState = {
     color: '#5102ce',
     icoUnicode: 'el-icon-success',
     isSpin: false
+  },
+  SERIAL_WAIT: {
+    id: 14,
+    desc: `${i18n.$t('Serial wait')}`,
+    color: '#5102ce',
+    icoUnicode: 'el-icon-loading',
+    isSpin: false
   }
 }
 
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
index 2d5af38..100f47f 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
@@ -57,7 +57,23 @@
           </el-input>
         </span>
       </div>
-
+      <div class="title" style="padding-top: 6px;">
+        <span class="text-b">{{$t('Process execute type')}}</span>
+        <span >
+          <el-select
+            :disabled="isDetails"
+            v-model="executionType"
+            size="small"
+            style="width: 180px">
+            <el-option
+                    v-for="item in itemsList"
+                    :key="item.key"
+                    :value="item.key"
+                    :label="$t(item.val)">
+            </el-option>
+          </el-select>
+        </span>
+      </div>
       <div class="title" style="padding-top: 6px;">
         <span>{{$t('Set global')}}</span>
       </div>
@@ -120,7 +136,15 @@
         // tenant code
         tenantCode: 'default',
         // checked Timeout alarm
-        checkedTimeout: true
+        checkedTimeout: true,
+        // process execute type
+        executionType: 'PARALLEL',
+        itemsList: [
+          { key: 'PARALLEL', val: 'parallel' },
+          { key: 'SERIAL_WAIT', val: 'Serial wait' },
+          { key: 'SERIAL_DISCARD', val: 'Serial discard' },
+          { key: 'SERIAL_PRIORITY', val: 'Serial priority' }
+        ]
       }
     },
     mixins: [disabledState],
@@ -151,6 +175,7 @@
         this.store.commit('dag/setName', _.cloneDeep(this.name))
         this.store.commit('dag/setTimeout', _.cloneDeep(this.timeout))
         this.store.commit('dag/setTenantCode', _.cloneDeep(this.tenantCode))
+        this.store.commit('dag/setExecutionType', _.cloneDeep(this.executionType))
         this.store.commit('dag/setDesc', _.cloneDeep(this.description))
         this.store.commit('dag/setSyncDefine', this.syncDefine)
         this.store.commit('dag/setReleaseState', this.releaseState)
@@ -263,6 +288,7 @@
           this.tenantCode = this.store.state.user.userInfo.tenantCode || 'default'
         }
       })
+      this.executionType = dag.executionType
     },
     mounted () {},
     components: { FormTenant, mLocalParams }
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
index 2064b04..a4f4f9b 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
@@ -266,7 +266,7 @@
        * Return run type
        */
       _rtRunningType (code) {
-        return _.filter(runningType, v => v.code === code)[0].desc
+        return (_.filter(runningType, v => v.code === code)[0] || {}).desc
       },
       /**
        * Return status
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
index 14295c7..f8136d5 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -143,6 +143,9 @@ export default {
         state.globalParams = res.data.processDefinition.globalParamList
         // timeout
         state.timeout = res.data.processDefinition.timeout
+        // executionType
+        state.executionType = res.data.processDefinition.executionType
+        // tenantId
         // tenantCode
         state.tenantCode = res.data.processDefinition.tenantCode || 'default'
         // tasks info
@@ -240,6 +243,8 @@ export default {
         state.globalParams = processDefinition.globalParamList
         // timeout
         state.timeout = processDefinition.timeout
+        // executionType
+        state.executionType = processDefinition.executionType
         // tenantCode
         state.tenantCode = res.data.tenantCode || 'default'
         // tasks info
@@ -282,6 +287,7 @@ export default {
         taskDefinitionJson: JSON.stringify(state.tasks),
         taskRelationJson: JSON.stringify(state.connects),
         tenantCode: state.tenantCode,
+        executionType: state.executionType,
         description: _.trim(state.description),
         globalParams: JSON.stringify(state.globalParams),
         timeout: state.timeout
@@ -303,6 +309,7 @@ export default {
         taskDefinitionJson: JSON.stringify(state.tasks),
         taskRelationJson: JSON.stringify(state.connects),
         tenantCode: state.tenantCode,
+        executionType: state.executionType,
         description: _.trim(state.description),
         globalParams: JSON.stringify(state.globalParams),
         timeout: state.timeout,
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js b/dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
index a89b09c..82828c5 100755
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
@@ -64,6 +64,12 @@ export default {
     state.timeout = payload
   },
   /**
+   * set executionType
+   */
+  setExecutionType (state, payload) {
+    state.executionType = payload
+  },
+  /**
    * set tenantCode
    */
   setTenantCode (state, payload) {
@@ -113,6 +119,7 @@ export default {
     state.name = (payload && payload.name) || ''
     state.description = (payload && payload.description) || ''
     state.timeout = (payload && payload.timeout) || 0
+    state.executionType = (payload && payload.executionType) || 'PARALLEL'
     state.tenantCode = (payload && payload.tenantCode) || 'default'
     state.processListS = (payload && payload.processListS) || []
     state.resourcesListS = (payload && payload.resourcesListS) || []
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/dag/state.js b/dolphinscheduler-ui/src/js/conf/home/store/dag/state.js
index 61e1af1..535ba45 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/state.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/state.js
@@ -37,6 +37,8 @@ export default {
   tasks: [],
   // Timeout alarm
   timeout: 0,
+  // process execute type
+  executionType: 'PARALLEL',
   // tenant code
   tenantCode: 'default',
   // Node location information
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 2369d41..afd236b 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
@@ -711,6 +711,12 @@ export default {
   'The condition content cannot be empty': 'The condition content cannot be empty',
   'Reference from': 'Reference from',
   'No more...': 'No more...',
+  'Process execute type': 'Process execute type',
+  parallel: 'parallel',
+  'Serial wait': 'Serial wait',
+  'Serial discard': 'Serial discard',
+  'Serial priority': 'Serial priority',
+  'Recover serial wait': 'Recover serial wait',
   IsEnableProxy: 'Enable Proxy',
   WebHook: 'WebHook',
   Keyword: 'Keyword',
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 1cf8cbc..e9a9b8b 100644
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
@@ -711,6 +711,12 @@ export default {
   'The condition content cannot be empty': '条件内容不能为空',
   'Reference from': '使用已有任务',
   'No more...': '没有更多了...',
+  'Process execute type': '执行策略',
+  parallel: '并行',
+  'Serial wait': '串行等待',
+  'Serial discard': '串行抛弃',
+  'Serial priority': '串行优先',
+  'Recover serial wait': '串行恢复',
   IsEnableProxy: '启用代理',
   WebHook: 'Web钩子',
   Keyword: '密钥',