From 0777a8fc06bb9e691685debf20c4ee7f0f87e48b Mon Sep 17 00:00:00 2001 From: wanglz Date: Mon, 4 Dec 2023 11:46:58 +0800 Subject: [PATCH 1/2] [INLONG-9383][Dashboard] Resource details display cluster label information --- .../pages/GroupDetail/ResourceInfo/index.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx b/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx index faa6984c388..5e88cdd1087 100644 --- a/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx +++ b/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx @@ -79,7 +79,13 @@ const Comp = ({ inlongGroupId, isCreate }: Props, ref) => { const dividerInfo = data => { let info = []; for (const item in data) { - if (data[item] !== null && item !== 'SortInfo' && item !== 'PULSAR' && item !== 'TUBEMQ') { + if ( + data[item] !== null && + item !== 'SortInfo' && + item !== 'PULSAR' && + item !== 'TUBEMQ' && + item !== 'inlongClusterTag' + ) { info.push(item); } } @@ -105,6 +111,17 @@ const Comp = ({ inlongGroupId, isCreate }: Props, ref) => { ); })} + {data?.hasOwnProperty('inlongClusterTag') && ( + <> + + Cluster tag {t('pages.GroupDetail.Resource.Info')} + +
+ Cluster tag: + {data?.inlongClusterTag} +
+ + )} {data?.hasOwnProperty('PULSAR') && ( <> From 79361d1ffa2fef1c2c1b50b2c555e4eabc514bbd Mon Sep 17 00:00:00 2001 From: wanglz Date: Mon, 4 Dec 2023 18:04:14 +0800 Subject: [PATCH 2/2] make some changes --- .../pages/GroupDetail/ResourceInfo/index.tsx | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx b/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx index 5e88cdd1087..945dc3f1c40 100644 --- a/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx +++ b/inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx @@ -94,10 +94,19 @@ const Comp = ({ inlongGroupId, isCreate }: Props, ref) => { return (
+ {data?.hasOwnProperty('inlongClusterTag') && ( + <> + Cluster tag {t('pages.GroupDetail.Resource.Info')} +
+ Cluster tag: + {data?.inlongClusterTag} +
+ + )} {dividerInfo(data).map(item => { return ( <> - + {clusters.find(c => c.value === item)?.label || item}{' '} {t('pages.GroupDetail.Resource.Info')} @@ -111,17 +120,6 @@ const Comp = ({ inlongGroupId, isCreate }: Props, ref) => { ); })} - {data?.hasOwnProperty('inlongClusterTag') && ( - <> - - Cluster tag {t('pages.GroupDetail.Resource.Info')} - -
- Cluster tag: - {data?.inlongClusterTag} -
- - )} {data?.hasOwnProperty('PULSAR') && ( <>