You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/09/18 17:11:22 UTC

[dolphinscheduler] branch 3.0.1-prepare updated: [Fix][UI] Fix workflow name overlaps bug (#11862) (#12019)

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

kerwin pushed a commit to branch 3.0.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/3.0.1-prepare by this push:
     new 70ddb11636 [Fix][UI] Fix workflow name overlaps bug (#11862) (#12019)
70ddb11636 is described below

commit 70ddb116366595b4ace5778d75cd9fe4f957d0ee
Author: Kerwin <37...@users.noreply.github.com>
AuthorDate: Mon Sep 19 01:11:16 2022 +0800

    [Fix][UI] Fix workflow name overlaps bug (#11862) (#12019)
    
    Co-authored-by: Devosend <de...@gmail.com>
---
 .../src/common/column-width-config.ts              |  3 ++
 .../projects/workflow/definition/use-table.ts      | 41 ++++++++++++++--------
 2 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/dolphinscheduler-ui/src/common/column-width-config.ts b/dolphinscheduler-ui/src/common/column-width-config.ts
index 663195162e..7df8dbc321 100644
--- a/dolphinscheduler-ui/src/common/column-width-config.ts
+++ b/dolphinscheduler-ui/src/common/column-width-config.ts
@@ -94,6 +94,9 @@ export const COLUMN_WIDTH_CONFIG = {
   },
   tag: {
     width: 160
+  },
+  copy: {
+    width: 50
   }
 }
 
diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts b/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
index 9510427b5e..4328bb7178 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
+++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
@@ -83,7 +83,8 @@ export function useTable() {
         title: t('project.workflow.workflow_name'),
         key: 'name',
         className: 'workflow-name',
-        width: 200,
+        ...COLUMN_WIDTH_CONFIG['name'],
+        titleColSpan: 2,
         render: (row) =>
           h(
             NSpace,
@@ -93,7 +94,7 @@ export function useTable() {
               class: styles['workflow-name']
             },
             {
-              default: () => [
+              default: () =>
                 h(
                   ButtonLink,
                   {
@@ -104,24 +105,34 @@ export function useTable() {
                       })
                   },
                   {
-                    default: () => h(NEllipsis, null, () => row.name)
+                    default: () =>
+                      h(
+                        NEllipsis,
+                        COLUMN_WIDTH_CONFIG['linkEllipsis'],
+                        () => row.name
+                      )
                   }
-                ),
-                h(
-                  NButton,
-                  {
-                    quaternary: true,
-                    circle: true,
-                    type: 'info',
-                    size: 'tiny',
-                    onClick: () => void copy(row.name)
-                  },
-                  { icon: () => h(NIcon, { size: 16 }, () => h(CopyOutlined)) }
                 )
-              ]
             }
           )
       },
+      {
+        title: 'Copy',
+        key: 'copy',
+        ...COLUMN_WIDTH_CONFIG['copy'],
+        render: (row) =>
+          h(
+            NButton,
+            {
+              quaternary: true,
+              circle: true,
+              type: 'info',
+              size: 'tiny',
+              onClick: () => void copy(row.name)
+            },
+            { icon: () => h(NIcon, { size: 16 }, () => h(CopyOutlined)) }
+          )
+      },
       {
         title: t('project.workflow.status'),
         key: 'releaseState',