From 3179680d5711886b7b14f90ccd4d0ecef883b33e Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Tue, 16 Nov 2021 16:17:32 +0530 Subject: [PATCH] Fixed #1206 Tier tag is not showing up on assets cards. (#1207) --- .../common/table-data-card/TableDataCard.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/catalog-rest-service/src/main/resources/ui/src/components/common/table-data-card/TableDataCard.tsx b/catalog-rest-service/src/main/resources/ui/src/components/common/table-data-card/TableDataCard.tsx index b40d6b2a539..383f4723e01 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/common/table-data-card/TableDataCard.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/common/table-data-card/TableDataCard.tsx @@ -48,7 +48,7 @@ const TableDataCard: FunctionComponent = ({ name, owner = '--', description, - tier = 'No Tier', + tier = '', usage, serviceType, fullyQualifiedName, @@ -66,9 +66,18 @@ const TableDataCard: FunctionComponent = ({ ? getUsagePercentile(usage) : undefined, }, - { key: 'Tier', value: tier }, + { key: 'Tier', value: tier ? tier : 'No Tier' }, ]; + const getAssetTags = () => { + const assetTags = [...(tags as Array)]; + if (tier) { + assetTags.unshift(tier); + } + + return [...new Set(assetTags)]; + }; + return (
= ({
{matches && matches.length > 0 ? (