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

dockerzhang pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new 315452ba0 [INLONG-8043][Dashboard] The label displays the cluster name 
as displayName (#8045)
315452ba0 is described below

commit 315452ba07f0fca750e08251dff91ce236efbc34
Author: Lizhen <[email protected]>
AuthorDate: Thu May 18 21:34:32 2023 +0800

    [INLONG-8043][Dashboard] The label displays the cluster name as displayName 
(#8045)
---
 CHANGES.md                                                     | 3 ++-
 inlong-dashboard/src/ui/pages/ClusterTags/ClusterBindModal.tsx | 5 ++++-
 inlong-dashboard/src/ui/pages/ClusterTags/ClusterList.tsx      | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 3a14fb154..fc20a5769 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -197,7 +197,8 @@
 | [INLONG-7971](https://github.com/apache/inlong/issues/7971) | 
[Feature][Dashboard] Support batch import fields by Excel                       
                               |
 | [INLONG-8001](https://github.com/apache/inlong/issues/8001) | 
[Feature][Dashboard] Support postgreSQL node management                         
                               |
 | [INLONG-8011](https://github.com/apache/inlong/issues/8011) | 
[Improve][Dashboard] Cluster name and node name can be modified when editing    
                               |
-| [INLONG-8011](https://github.com/apache/inlong/issues/8022) | 
[Improve][Dashboard] Node management title text optimization                    
                               |
+| [INLONG-8022](https://github.com/apache/inlong/issues/8022) | 
[Improve][Dashboard] Node management title text optimization                    
                               |
+| [INLONG-8043](https://github.com/apache/inlong/issues/8043) | 
[Improve][Dashboard] The label displays the cluster name as displayName         
                               |
 
 ### Other
 |                            ISSUE                            | Summary        
                                                                                
         |
diff --git a/inlong-dashboard/src/ui/pages/ClusterTags/ClusterBindModal.tsx 
b/inlong-dashboard/src/ui/pages/ClusterTags/ClusterBindModal.tsx
index 96a16a4c6..f2cd00215 100644
--- a/inlong-dashboard/src/ui/pages/ClusterTags/ClusterBindModal.tsx
+++ b/inlong-dashboard/src/ui/pages/ClusterTags/ClusterBindModal.tsx
@@ -24,6 +24,7 @@ import FormGenerator, { useForm } from 
'@/ui/components/FormGenerator';
 import { useUpdateEffect } from '@/ui/hooks';
 import i18n from '@/i18n';
 import request from '@/core/utils/request';
+import { clusters } from '@/plugins/clusters';
 
 export interface Props extends ModalProps {
   clusterTag: string;
@@ -79,7 +80,9 @@ const Comp: React.FC<Props> = ({ clusterTag, ...modalProps }) 
=> {
               formatResult: result =>
                 result?.list?.map(item => ({
                   ...item,
-                  label: `${item.name} (${item.type})`,
+                  label: `${item.displayName === null ? item.name : 
item.displayName} (${
+                    clusters.find(c => c.value === item.type)?.label || 
item.type
+                  })`,
                   value: item.id,
                 })),
             },
diff --git a/inlong-dashboard/src/ui/pages/ClusterTags/ClusterList.tsx 
b/inlong-dashboard/src/ui/pages/ClusterTags/ClusterList.tsx
index 3dc5eed84..6e1330870 100644
--- a/inlong-dashboard/src/ui/pages/ClusterTags/ClusterList.tsx
+++ b/inlong-dashboard/src/ui/pages/ClusterTags/ClusterList.tsx
@@ -132,7 +132,7 @@ const Comp: React.FC<ClusterListProps> = ({ clusterTag }) 
=> {
     const defaultColumns = [
       {
         title: i18n.t('pages.Clusters.Name'),
-        dataIndex: 'name',
+        dataIndex: 'displayName',
         ellipsisMulti: 2,
       },
       {

Reply via email to