You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by lg...@apache.org on 2020/01/13 12:56:55 UTC

[incubator-dolphinscheduler] branch dev-1.2.1 updated: Fix page number loading issue and dag not getting value(#1810) (#1815)

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

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


The following commit(s) were added to refs/heads/dev-1.2.1 by this push:
     new a1b2aa2  Fix page number loading issue and dag not getting value(#1810) (#1815)
a1b2aa2 is described below

commit a1b2aa227113312739458c326db5ec6190920eec
Author: break60 <79...@qq.com>
AuthorDate: Mon Jan 13 20:56:47 2020 +0800

    Fix page number loading issue and dag not getting value(#1810) (#1815)
    
    * merge dev branch front-end code
    
    * fix udfs assignment
    
    * Fix task instance page jump
    
    * fix udfs assignment and task instance page jump #1789
    
    * Fixed space and icon display issues before and after the input box
    
    * add license
    
    * add license
    
    * Fix data echo, style and popup cannot be closed
    
    * Fix page number loading issue and dag not getting value
---
 .../js/conf/home/pages/dag/_source/formModel/formModel.vue   |  6 ++++--
 .../pages/dag/_source/formModel/tasks/_source/sqlType.vue    |  2 +-
 .../src/js/conf/home/pages/datasource/pages/list/index.vue   | 12 ++++++++----
 .../pages/projects/pages/definition/pages/list/index.vue     | 12 ++++++++----
 .../home/pages/projects/pages/instance/pages/list/index.vue  | 12 ++++++++----
 .../src/js/conf/home/pages/projects/pages/list/index.vue     | 12 ++++++++----
 .../conf/home/pages/resource/pages/file/pages/list/index.vue | 10 +++++++---
 .../home/pages/resource/pages/udf/pages/function/index.vue   | 12 ++++++++----
 .../home/pages/resource/pages/udf/pages/resource/index.vue   | 12 ++++++++----
 .../src/js/conf/home/pages/security/pages/queue/index.vue    | 12 ++++++++----
 .../src/js/conf/home/pages/security/pages/tenement/index.vue | 12 ++++++++----
 .../src/js/conf/home/pages/security/pages/users/index.vue    | 12 ++++++++----
 .../conf/home/pages/security/pages/warningGroups/index.vue   | 12 ++++++++----
 .../js/conf/home/pages/security/pages/workerGroups/index.vue | 12 ++++++++----
 .../src/js/conf/home/pages/user/pages/token/index.vue        | 12 ++++++++----
 dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js    |  5 +++++
 16 files changed, 113 insertions(+), 54 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 bca4eec..a97499f 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
@@ -469,7 +469,7 @@
       JSP.removePaste()
       // Backfill data
       let taskList = this.store.state.dag.tasks
-
+      
       //fillback use cacheTasks
       let cacheTasks = this.store.state.dag.cacheTasks
       let o = {}
@@ -511,11 +511,13 @@
             this.workerGroupId = o.workerGroupId
           }
 
+          this.params = o.params || {}
+          this.dependence = o.dependence || {}
       }
       this.isContentBox = true
     },
     mounted () {
-
+      
     },
     updated () {
     },
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue
index 49fb4a2..ecb7d2c 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue
@@ -20,7 +20,7 @@
             v-model="sqlTypeId"
             :disabled="isDetails"
             @on-change="_handleSqlTypeChanged"
-            style="width: 90px;">
+            style="width: 120px;">
       <x-option
               v-for="city in sqlTypeList"
               :key="city.id"
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
index 19640cc..e843558 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
@@ -124,10 +124,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getDatasourcesListP(this.searchParams).then(res => {
-          this.datasourcesList = []
-          this.datasourcesList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.datasourcesList = []
+            this.datasourcesList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
index d168ce7..1f28578 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
@@ -100,10 +100,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getProcessListP(this.searchParams).then(res => {
-          this.processListP = []
-          this.processListP = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.processListP = []
+            this.processListP = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
index 4bf169b..7bcf9ac 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
@@ -105,10 +105,14 @@
       _getProcessInstanceListP (flag) {
         this.isLoading = !flag
         this.getProcessInstance(this.searchParams).then(res => {
-          this.processInstanceList = []
-          this.processInstanceList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.processInstanceList = []
+            this.processInstanceList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
index 74121f5..d9828c0 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
@@ -110,10 +110,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getProjectsList(this.searchParams).then(res => {
-          this.projectsList = []
-          this.projectsList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.projectsList = []
+            this.projectsList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
index de7f773..8f1f939 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
@@ -91,9 +91,13 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getResourcesListP(this.searchParams).then(res => {
-          this.fileResourcesList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.fileResourcesList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
index c94a8dc..df46d7f 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
@@ -109,10 +109,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getUdfFuncListP(this.searchParams).then(res => {
-          this.udfFuncList = []
-          this.udfFuncList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.udfFuncList = []
+            this.udfFuncList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue
index 8b86966..732c5a2 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue
@@ -96,10 +96,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getResourcesListP(this.searchParams).then(res => {
-          this.udfResourcesList = []
-          this.udfResourcesList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.udfResourcesList = []
+            this.udfResourcesList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
index ed5bf2c..47ce14a 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
@@ -118,10 +118,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getQueueListP(this.searchParams).then(res => {
-          this.queueList = []
-          this.queueList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.queueList = []
+            this.queueList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue
index 8063fd0..0c38f0a 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue
@@ -122,10 +122,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getTenantListP(this.searchParams).then(res => {
-          this.tenementList = []
-          this.tenementList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.tenementList = []
+            this.tenementList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
index b137de7..f8ad40d 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
@@ -120,10 +120,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getUsersListP(this.searchParams).then(res => {
-          this.userList = []
-          this.userList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.userList = []
+            this.userList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
index 76bbc32..e70ead4 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
@@ -122,10 +122,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getAlertgroupP(this.searchParams).then(res => {
-          this.alertgroupList = []
-          this.alertgroupList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.alertgroupList = []
+            this.alertgroupList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
index 10f4932..54a0440 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
@@ -121,10 +121,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getWorkerGroups(this.searchParams).then(res => {
-          this.workerGroupList = []
-          this.workerGroupList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.workerGroupList = []
+            this.workerGroupList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue
index a9fbeb0..21d2bec 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue
@@ -122,10 +122,14 @@
       _getList (flag) {
         this.isLoading = !flag
         this.getTokenListP(this.searchParams).then(res => {
-          this.tokenList = []
-          this.tokenList = res.totalList
-          this.total = res.total
-          this.isLoading = false
+          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
+            this.searchParams.pageNo = this.searchParams.pageNo -1
+          } else {
+            this.tokenList = []
+            this.tokenList = res.totalList
+            this.total = res.total
+            this.isLoading = false
+          }
         }).catch(e => {
           this.isLoading = false
         })
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 52237a6..20bc113 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -147,6 +147,11 @@ export default {
         let processInstanceJson = JSON.parse(res.data.processInstanceJson)
         // tasks info
         state.tasks = processInstanceJson.tasks
+        // tasks cache
+        state.cacheTasks = {}
+        processInstanceJson.tasks.forEach(v => {
+          state.cacheTasks[v.id] = v
+        })
         // global params
         state.globalParams = processInstanceJson.globalParams
         // timeout