From fe15afdb99bf633f5904e034c294ffb5c0bc9e58 Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Thu, 9 Sep 2021 13:50:30 +0530 Subject: [PATCH] Fixed #427, #428 Sample Data breaks -UI and elastic-search unsecure mode breaks (#448) --- .../common/error-with-placeholder/ErrorPlaceHolderES.tsx | 4 +++- .../ui/src/components/my-data-details/SampleDataTable.tsx | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx b/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx index d55e32ea25c..1528f8d2fa6 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx @@ -70,7 +70,9 @@ const ErrorPlaceHolderES = ({ type, errorMessage }: Props) => {

{`Hi, ${ - AppState.userDetails.displayName || AppState.users[0].displayName + AppState.userDetails.displayName || AppState.users?.length > 0 + ? AppState.users[0].displayName + : 'User' }!`}

{type === 'noData' && noRecordForES()} diff --git a/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SampleDataTable.tsx b/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SampleDataTable.tsx index 2d1b19bfd98..2d0c06ef6a1 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SampleDataTable.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SampleDataTable.tsx @@ -61,13 +61,13 @@ const SampleDataTable: FunctionComponent = ({ sampleData }: Props) => { )} data-testid="row" key={rowIndex}> - {row.map((data) => { + {row.map((data, index) => { return ( - {data} + key={index}> + {data ? data.toString() : '--'} ); })}