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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 00829b9  [Feature-4451][UI]: add an option to the UI page for saving 
the workflow definition: whether to go online? online by default (#4474)
00829b9 is described below

commit 00829b99fd9b746f8c44d2ceb3cdb6448042a2b9
Author: linyanbin666 <[email protected]>
AuthorDate: Sat Jan 16 22:43:28 2021 +0800

    [Feature-4451][UI]: add an option to the UI page for saving the workflow 
definition: whether to go online? online by default (#4474)
    
    Co-authored-by: linyanbin <[email protected]>
---
 .../src/js/conf/home/pages/dag/_source/udp/udp.vue               | 9 +++++++++
 dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js        | 3 ++-
 dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js      | 3 +++
 dolphinscheduler-ui/src/js/conf/home/store/dag/state.js          | 2 ++
 dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js           | 1 +
 dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js           | 1 +
 6 files changed, 18 insertions(+), 1 deletion(-)

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 74dbf3f..a57f472 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
@@ -74,6 +74,11 @@
     </div>
     <div class="bottom">
       <div class="submit">
+        <template v-if="router.history.current.name === 
'projects-definition-details'">
+          <div class="lint-pt">
+            <el-checkbox v-model="releaseState" size="small" :false-label="0" 
:true-label="1">{{$t('Whether to go online the process 
definition')}}</el-checkbox>
+          </div>
+        </template>
         <template v-if="router.history.current.name === 
'projects-instance-details'">
           <div class="lint-pt">
             <el-checkbox v-model="syncDefine" size="small">{{$t('Whether to 
update the process definition')}}</el-checkbox>
@@ -106,6 +111,8 @@
         udpList: [],
         // Global custom parameters
         udpListCache: [],
+        // Whether to go online the process definition
+        releaseState: 1,
         // Whether to update the process definition
         syncDefine: true,
         // Timeout alarm
@@ -141,6 +148,7 @@
         this.store.commit('dag/setTenantId', _.cloneDeep(this.tenantId))
         this.store.commit('dag/setDesc', _.cloneDeep(this.description))
         this.store.commit('dag/setSyncDefine', this.syncDefine)
+        this.store.commit('dag/setReleaseState', this.releaseState)
       },
       /**
        * submit
@@ -201,6 +209,7 @@
       this.originalName = dag.name
       this.description = dag.description
       this.syncDefine = dag.syncDefine
+      this.releaseState = dag.releaseState
       this.timeout = dag.timeout || 0
       this.checkedTimeout = this.timeout !== 0
       this.$nextTick(() => {
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 7f895db..313ed83 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -318,7 +318,8 @@ export default {
         connects: JSON.stringify(state.connects),
         name: _.trim(state.name),
         description: _.trim(state.description),
-        id: payload
+        id: payload,
+        releaseState: state.releaseState
       }, res => {
         resolve(res)
         state.isEditDag = false
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 29b13a0..93614c0 100755
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/mutations.js
@@ -75,6 +75,9 @@ export default {
   setDesc (state, payload) {
     state.description = payload
   },
+  setReleaseState (state, payload) {
+    state.releaseState = payload
+  },
   /**
    * Whether to update the process definition
    */
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 e3c75b8..d8e09cd 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/state.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/state.js
@@ -45,6 +45,8 @@ export default {
   isEditDag: false,
   // Current project
   projectName: projectName || '',
+  // Whether to go online the process definition
+  releaseState: 1,
   // Whether to update the process definition
   syncDefine: true,
   // tasks processList
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 9bbd27c..c8216d4 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
@@ -64,6 +64,7 @@ export default {
   'Set the DAG diagram name': 'Set the DAG diagram name',
   'Please enter description(optional)': 'Please enter description(optional)',
   'Set global': 'Set global',
+  'Whether to go online the process definition': 'Whether to go online the 
process definition',
   'Whether to update the process definition': 'Whether to update the process 
definition',
   Add: 'Add',
   'DAG graph name cannot be empty': 'DAG graph name cannot be empty',
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 cbc27b2..2aa94cc 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
@@ -64,6 +64,7 @@ export default {
   'Set the DAG diagram name': '设置DAG图名称',
   'Please enter description(optional)': '请输入描述(选填)',
   'Set global': '设置全局',
+  'Whether to go online the process definition': '是否上线流程定义',
   'Whether to update the process definition': '是否更新流程定义',
   Add: '添加',
   'DAG graph name cannot be empty': 'DAG图名称不能为空',

Reply via email to