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

liuxiaochun 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 c453a5b  dag add close buttion (#3195)
c453a5b is described below

commit c453a5bd4ce8e9a0367ef52948053161164ac418
Author: BoYiZhang <[email protected]>
AuthorDate: Wed Jul 15 10:46:54 2020 +0800

    dag add close buttion (#3195)
    
    * fix bug
    
    Delete invalid field: executorcores
    
    Modify verification prompt
    
    * fix bug
    
    Delete invalid field: executorcores
    
    Modify verification prompt
    
    * fix bug
    
    Delete invalid field: executorcores
    
    Modify verification prompt
    
    * dag  add close button
    
    * reset last version
    
    * reset last version
    
    * dag add close buttion
    
    dag add close buttion
    
    * update  CLICK_SAVE_WORKFLOW_BUTTON  xpath
    
    * updae CLICK_SAVE_WORKFLOW_BUTTON xpath
    
    * updae CLICK_SAVE_WORKFLOW_BUTTON xpath
    
    * updae CLICK_SAVE_WORKFLOW_BUTTON xpath
    
    * Update CreateWorkflowLocator.java
    
    modify submit workflow button
    
    * Update CreateWorkflowLocator.java
    
    * Update CreateWorkflowLocator.java
    
    modify CLICK_ADD_BUTTON
    
    * Update CreateWorkflowLocator.java
    
    delete print
    
    * Update CreateWorkflowLocator.java
    
    1
    
    * Update CreateWorkflowLocator.java
    
    1
    
    * Setting '-XX:+DisableExplicitGC ' causes netty memory leaks
    
    in addition
    
    update '- XX: largepagesizeinbytes = 128M' to '- XX: largepagesizeinbytes = 
10M'
    
    * Update dag.vue
    
    * Update dag.vue
    
    * Update dag.vue
    
    * Update CreateWorkflowLocator.java
    
    * Revert "Setting '-XX:+DisableExplicitGC ' causes netty memory leaks"
    
    This reverts commit 3a2cba7a
    
    Co-authored-by: dailidong <[email protected]>
    Co-authored-by: xingchun-chen 
<[email protected]>
---
 .../src/js/conf/home/pages/dag/_source/dag.vue      | 21 +++++++++++++++++++++
 .../locator/project/CreateWorkflowLocator.java      |  9 ++++-----
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
index eb58da4..7b73151 100755
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
@@ -102,6 +102,17 @@
             {{$t('Return_1')}}
           </x-button>
           <x-button
+            type="primary"
+            v-tooltip.light="$t('Close')" 
+            icon="ans-icon-off"
+            size="xsmall"
+            data-container="body"
+            v-if="(type === 'instance' || 'definition') "
+            style="vertical-align: middle;"
+            @click="_closeDAG">
+            {{$t('Close')}}
+          </x-button>
+          <x-button
                   style="vertical-align: middle;"
                   type="primary"
                   size="xsmall"
@@ -377,6 +388,14 @@
           })
         })
       },
+      _closeDAG(){
+        let $name = this.$route.name
+        if($name && $name.indexOf("definition") != -1){
+          this.$router.push({ name: 'projects-definition-list'})
+        }else{
+          this.$router.push({ name: 'projects-instance-list'})
+        }
+      },
       _verifConditions (value) {
         let tasks = value
         let bool = true
@@ -660,3 +679,5 @@
 <style lang="scss" rel="stylesheet/scss">
   @import "./dag";
 </style>
+
+
diff --git 
a/e2e/src/test/java/org/apache/dolphinscheduler/locator/project/CreateWorkflowLocator.java
 
b/e2e/src/test/java/org/apache/dolphinscheduler/locator/project/CreateWorkflowLocator.java
index 5163f0f..ad18b62 100644
--- 
a/e2e/src/test/java/org/apache/dolphinscheduler/locator/project/CreateWorkflowLocator.java
+++ 
b/e2e/src/test/java/org/apache/dolphinscheduler/locator/project/CreateWorkflowLocator.java
@@ -24,7 +24,6 @@ public class CreateWorkflowLocator {
     /**
      * jump workflow define page
      */
-
     // click project name
     public static final By CLICK_PROJECT_NAME = By.xpath("//span/a");
 
@@ -119,14 +118,14 @@ public class CreateWorkflowLocator {
     public static final By CLICK_DELETE_CUSTOM_PARAMETERS = 
By.xpath("//div[2]/span/a/em");
 
     //click submit button
-    public static final By CLICK_SUBMIT_BUTTON = By.xpath("//button[2]/span");
+    public static final By CLICK_SUBMIT_BUTTON = 
By.xpath("//div[3]/div/button[2]/span");
 
 
     /**
      * save workflow
      */
     //click save workflow button
-    public static final By CLICK_SAVE_WORKFLOW_BUTTON = 
By.xpath("//button/span");
+    public static final By CLICK_SAVE_WORKFLOW_BUTTON = 
By.xpath("//div[2]/div[1]/div[2]/button[2]");
 
     //input  workflow name
     public static final By INPUT_WORKFLOW_NAME = By.xpath("//input");
@@ -166,8 +165,7 @@ public class CreateWorkflowLocator {
     public static final By CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS = 
By.xpath("//div[2]/span/a/em");
 
     //click add button
-    public static final By CLICK_ADD_BUTTON = By.xpath("//button[2]/span");
-
+    public static final By CLICK_ADD_BUTTON = 
By.xpath("//div[2]/div/button[2]/span");    
     //scroll to element bottom
     public static final By SCROLL_BOTTOM = By.xpath("//span/a/em");
 
@@ -192,4 +190,5 @@ public class CreateWorkflowLocator {
 
     //click confirm delete workflow button
     public static final By CONFIRM_DELETE_WORKFLOW_BOTTOM = 
By.xpath("//div[2]/div/button[2]/span");
+    
 }

Reply via email to