浏览代码

Worker group parameter modification (#2188)

* Delete worker group management page

* Modify workgroupid parameter name

* Worker group parameter modification
break60 5 年之前
父节点
当前提交
aa650b4426
共有 1 个文件被更改,包括 13 次插入4 次删除
  1. 13 4
      dolphinscheduler-ui/src/js/conf/home/store/security/actions.js

+ 13 - 4
dolphinscheduler-ui/src/js/conf/home/store/security/actions.js

@@ -451,10 +451,19 @@ export default {
     return new Promise((resolve, reject) => {
       io.get(`worker-group/all-groups`, payload, res => {
         let list = res.data
-        list.unshift({
-          id: 'default',
-          name: 'Default'
-        })
+        if(list.length>0) {
+          list = list.map(item=>{
+            return {
+              id: item,
+              name: item
+            }
+          })
+        } else {
+          list.unshift({
+            id: 'default',
+            name: 'Default'
+          })
+        }
         state.workerGroupsListAll = list
         resolve(list)
       }).catch(e => {