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

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


The following commit(s) were added to refs/heads/dev by this push:
     new ba2b482624 [Improvement-17926] Supports creating worker groups without 
workers (#17927)
ba2b482624 is described below

commit ba2b4826241cc314005ed1030439f80184207f99
Author: Wenjun Ruan <[email protected]>
AuthorDate: Thu Feb 5 15:38:23 2026 +0800

    [Improvement-17926] Supports creating worker groups without workers (#17927)
---
 .../worker-group-manage/components/use-modal.ts      |  9 ---------
 .../components/worker-group-modal.tsx                | 10 +++++++---
 .../views/security/worker-group-manage/use-table.ts  | 20 +++++++++++---------
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git 
a/dolphinscheduler-ui/src/views/security/worker-group-manage/components/use-modal.ts
 
b/dolphinscheduler-ui/src/views/security/worker-group-manage/components/use-modal.ts
index 379571f818..893aa430f5 100644
--- 
a/dolphinscheduler-ui/src/views/security/worker-group-manage/components/use-modal.ts
+++ 
b/dolphinscheduler-ui/src/views/security/worker-group-manage/components/use-modal.ts
@@ -47,15 +47,6 @@ export function useModal(
             return new Error(t('security.worker_group.group_name_tips'))
           }
         }
-      },
-      addrList: {
-        required: true,
-        trigger: ['input', 'blur'],
-        validator() {
-          if (variables.model.addrList.length < 1) {
-            return new Error(t('security.worker_group.worker_addresses_tips'))
-          }
-        }
       }
     }
   })
diff --git 
a/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx
 
b/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx
index b51e841c8d..aecde8f157 100644
--- 
a/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx
+++ 
b/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx
@@ -78,7 +78,9 @@ const WorkerGroupModal = defineComponent({
         } else {
           variables.model.id = props.row.id
           variables.model.name = props.row.name
-          variables.model.addrList = props.row.addrList.split(',')
+          variables.model.addrList = props.row.addrList
+            ? props.row.addrList.split(',')
+            : []
         }
       }
     )
@@ -88,7 +90,9 @@ const WorkerGroupModal = defineComponent({
       () => {
         variables.model.id = props.row.id
         variables.model.name = props.row.name
-        variables.model.addrList = props.row.addrList.split(',')
+        variables.model.addrList = props.row.addrList
+          ? props.row.addrList.split(',')
+          : []
       }
     )
 
@@ -107,7 +111,7 @@ const WorkerGroupModal = defineComponent({
           show={this.showModalRef}
           onCancel={this.cancelModal}
           onConfirm={this.confirmModal}
-          confirmDisabled={!this.model.name || this.model.addrList.length < 1}
+          confirmDisabled={!this.model.name}
           confirmClassName='btn-submit'
           cancelClassName='btn-cancel'
           confirmLoading={this.saving}
diff --git 
a/dolphinscheduler-ui/src/views/security/worker-group-manage/use-table.ts 
b/dolphinscheduler-ui/src/views/security/worker-group-manage/use-table.ts
index 3213d76fc2..d4cafadbc6 100644
--- a/dolphinscheduler-ui/src/views/security/worker-group-manage/use-table.ts
+++ b/dolphinscheduler-ui/src/views/security/worker-group-manage/use-table.ts
@@ -55,16 +55,18 @@ export function useTable() {
         key: 'addrList',
         render: (row: WorkerGroupItem) =>
           h(NSpace, null, {
-            default: () =>
-              row.addrList
-                .split(',')
-                .map((item: string) =>
-                  h(
-                    NTag,
-                    { type: 'success', size: 'small' },
-                    { default: () => item }
+            default: () => {
+              const addrList = row.addrList ? row.addrList.split(',') : []
+              return addrList.length
+                ? addrList.map((item: string) =>
+                    h(
+                      NTag,
+                      { type: 'success', size: 'small' },
+                      { default: () => item }
+                    )
                   )
-                )
+                : h('span', { style: { color: '#999' } }, '-')
+            }
           })
       },
       {

Reply via email to