Pārlūkot izejas kodu

Modify process group workerGroup value display and filter child node duplicate values

break60 4 gadi atpakaļ
vecāks
revīzija
d4ef2293df

+ 2 - 1
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue

@@ -581,7 +581,8 @@
               taskType: type,
               self: self,
               preNode: preNode,
-              rearList: rearList
+              rearList: rearList,
+              instanceId: this.$route.params.id
             }
           })
         })

+ 10 - 3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue

@@ -268,6 +268,7 @@
 </template>
 <script>
   import _ from 'lodash'
+  import { mapActions } from 'vuex'
   import mLog from './log'
   import mMr from './tasks/mr'
   import mSql from './tasks/sql'
@@ -356,9 +357,11 @@
       taskType: String,
       self: Object,
       preNode: Array,
-      rearList: Array
+      rearList: Array,
+      instanceId: Number
     },
     methods: {
+      ...mapActions('dag', ['getTaskInstanceList']),
       /**
        * depend
        */
@@ -633,8 +636,12 @@
             break;
           }
         }
-        if(!hasMatch && o.workerGroupId!=undefined){
-          this.workerGroup = 'default'
+        if(o.workerGroup == undefined) {
+          this.store.dispatch('dag/getTaskInstanceList',{
+            pageSize: 10, pageNo: 1, processInstanceId: this.instanceId, name: o.name
+          }).then(res => {
+            this.workerGroup = res.totalList[0].workerGroup
+          })
         } else {
           this.workerGroup = o.workerGroup
         }

+ 6 - 1
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue

@@ -95,7 +95,12 @@
     },
     created () {
       let processListS = _.cloneDeep(this.store.state.dag.processListS)
-      let id = this.router.history.current.params.id || null
+      let id = null
+      if(this.router.history.current.name==='projects-instance-details') {
+        id = this.router.history.current.query.id || null
+      } else {
+        id = this.router.history.current.params.id || null
+      }
       this.processDefinitionList = (() => {
         let a = _.map(processListS, v => {
           return {

+ 1 - 1
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@@ -70,7 +70,7 @@
             <span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
           </td>
           <td style="min-width: 200px;max-width: 300px;padding-right: 10px;">
-            <span class="ellipsis" style="padding-left: 4px;"><router-link :to="{ path: '/projects/instance/list/' + item.id}" tag="a" class="links" :title="item.name">{{item.name}}</router-link></span>
+            <span class="ellipsis" style="padding-left: 4px;"><router-link :to="{ path: '/projects/instance/list/' + item.id , query:{id: item.processDefinitionId}}" tag="a" class="links" :title="item.name">{{item.name}}</router-link></span>
           </td>
           <td>
             <span v-html="_rtState(item.state)" style="cursor: pointer;"></span>