From cf90d4b418e5c3a18314ee68988d341294e9e3e1 Mon Sep 17 00:00:00 2001 From: ayemets-corcentric <106543964+ayemets-corcentric@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:49:25 +0100 Subject: [PATCH 1/4] feat(odd-platform-up): add relationship tab (#1640) --- .../DataEntitiesUsageInfo.tsx | 8 ++++++-- .../Search/Results/Results.styles.ts | 19 +++++++++++++++++++ .../SearchResultsTabs/SearchResultsTabs.tsx | 5 +++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/odd-platform-ui/src/components/Overview/DataEntitiesUsageInfo/DataEntitiesUsageInfo.tsx b/odd-platform-ui/src/components/Overview/DataEntitiesUsageInfo/DataEntitiesUsageInfo.tsx index b8fac3e38..3b38b18e1 100644 --- a/odd-platform-ui/src/components/Overview/DataEntitiesUsageInfo/DataEntitiesUsageInfo.tsx +++ b/odd-platform-ui/src/components/Overview/DataEntitiesUsageInfo/DataEntitiesUsageInfo.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { useDataEntitiesUsage } from 'lib/hooks/api'; import { useCreateSearch } from 'lib/hooks'; +import type { SearchFormData } from 'generated-sources'; import DataEntitiesUsageInfoView from './DataEntityUsageInfoView/DataEntitiesUsageInfoView'; export interface HandleEntityClassClickParams { @@ -21,7 +22,8 @@ const DataEntitiesUsageInfo: React.FC = () => { const handleEntityClassClick = React.useCallback( ({ entityId, entityName }: HandleEntityClassClickParams) => { - const searchFormData = { + const searchFormData: SearchFormData = { + query: '', filters: { entityClasses: [{ entityId, entityName, selected: true }] }, }; createSearch(searchFormData); @@ -43,7 +45,9 @@ const DataEntitiesUsageInfo: React.FC = () => { const types = [ { entityId: entityClassTypeId, entityName: entityClassTypeName, selected }, ]; - const searchFormData = { filters: { entityClasses, types } }; + const searchFormData: SearchFormData = { + filters: { entityClasses, types }, + }; createSearch(searchFormData); }, [] diff --git a/odd-platform-ui/src/components/Search/Results/Results.styles.ts b/odd-platform-ui/src/components/Search/Results/Results.styles.ts index 6c177502c..328f40f04 100644 --- a/odd-platform-ui/src/components/Search/Results/Results.styles.ts +++ b/odd-platform-ui/src/components/Search/Results/Results.styles.ts @@ -26,7 +26,21 @@ export const SearchCol = styled(Grid)(() => ({ paddingLeft: '8px', })); +// nm - Name +// nd - Namespace, Datasource +// ow - Owner +// gr - Group +// cr - Created +// up - Updated +// st - Status type MainColNames = 'nm' | 'nd' | 'ow' | 'gr' | 'cr' | 'up' | 'st'; +// us - Use +// rc - Rows / Columns +// sr - Sources +// tr - Targets +// en - Entities +// su - Suite URL +// ne - Number of entities type AddColNames = 'us' | 'rc' | 'sr' | 'tr' | 'en' | 'su' | 'ne'; export type SearchTabsNames = @@ -36,6 +50,7 @@ export type SearchTabsNames = | typeof DataEntityClassNameEnum.INPUT | typeof DataEntityClassNameEnum.ENTITY_GROUP | typeof DataEntityClassNameEnum.QUALITY_TEST + | typeof DataEntityClassNameEnum.RELATIONSHIP | 'all' | 'my'; export type ColGridSizes = Record & @@ -136,4 +151,8 @@ export const gridSizes: GridSizes = { lg: { nm: 2.68, ne: 1.09, nd: 1.91, ow: 1.81, gr: 1.91, st: 1, cr: 0.8, up: 0.8 }, md: { nm: 2.68, ne: 1.09, nd: 1.91, ow: 1.81, gr: 1.91, st: 1, cr: 0.8, up: 0.8 }, }, + DATA_RELATIONSHIP: { + lg: { nm: 2.68, nd: 2.28, ow: 2.08, gr: 2.28, st: 1, cr: 0.8, up: 0.8 }, + md: { nm: 2.68, nd: 2.28, ow: 2.08, gr: 2.28, st: 1, cr: 0.8, up: 0.8 }, + }, }; diff --git a/odd-platform-ui/src/components/Search/Results/SearchResultsTabs/SearchResultsTabs.tsx b/odd-platform-ui/src/components/Search/Results/SearchResultsTabs/SearchResultsTabs.tsx index 783f440c4..4104ada9a 100644 --- a/odd-platform-ui/src/components/Search/Results/SearchResultsTabs/SearchResultsTabs.tsx +++ b/odd-platform-ui/src/components/Search/Results/SearchResultsTabs/SearchResultsTabs.tsx @@ -55,6 +55,11 @@ const SearchResultsTabs: React.FC = ({ hint: totals[DataEntityClassNameEnum.ENTITY_GROUP]?.count || 0, value: totals[DataEntityClassNameEnum.ENTITY_GROUP]?.id, }, + { + name: 'Relationships', + hint: totals[DataEntityClassNameEnum.RELATIONSHIP]?.count || 0, + value: totals[DataEntityClassNameEnum.RELATIONSHIP]?.id, + }, ]); }, [totals]); From 88e00b24027540b151456ea9c1f02879f4343b03 Mon Sep 17 00:00:00 2001 From: ayemets-corcentric <106543964+ayemets-corcentric@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:33:45 +0100 Subject: [PATCH 2/4] feat(odd-platform-up): add relationship overview stats (#1640) --- .../OverviewRelationshipStats.tsx | 24 +++ .../OverviewRelationshipStatsStyles.ts | 17 ++ .../OverviewEntityRelationship.tsx | 185 ++++++++++++++++++ .../OverviewGraphRelationship.tsx | 112 +++++++++++ .../RelationshipIcon.tsx | 78 ++++++++ .../Overview/OverviewStats/OverviewStats.tsx | 8 + .../Relationships/RelationshipsListItem.tsx | 27 +-- .../Relationships/RelationshipDatasetInfo.tsx | 24 +++ .../hooks/api/dataModelling/relatioships.ts | 16 +- .../redux/selectors/dataentity.selectors.ts | 6 +- 10 files changed, 472 insertions(+), 25 deletions(-) create mode 100644 odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStats.tsx create mode 100644 odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStatsStyles.ts create mode 100644 odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx create mode 100644 odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewGraphRelationship.tsx create mode 100644 odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/RelationshipIcon.tsx create mode 100644 odd-platform-ui/src/components/shared/elements/Relationships/RelationshipDatasetInfo.tsx diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStats.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStats.tsx new file mode 100644 index 000000000..e12829b8a --- /dev/null +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStats.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { type DataEntityDetails } from 'generated-sources'; +import { DataEntityTypeNameEnum } from 'generated-sources'; +import OverviewEntityRelationship from './OverviewRelationshipType/OverviewEntityRelationship'; +import OverviewGraphRelationship from './OverviewRelationshipType/OverviewGraphRelationship'; + +interface OverviewRelationshipStatsProps { + dataEntityDetails: DataEntityDetails; +} + +const OverviewRelationshipStats: React.FC = ({ + dataEntityDetails, +}) => { + switch (dataEntityDetails.type.name) { + case DataEntityTypeNameEnum.ENTITY_RELATIONSHIP: + return ; + case DataEntityTypeNameEnum.GRAPH_RELATIONSHIP: + return ; + default: + return null; + } +}; + +export default OverviewRelationshipStats; diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStatsStyles.ts b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStatsStyles.ts new file mode 100644 index 000000000..c20309029 --- /dev/null +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipStatsStyles.ts @@ -0,0 +1,17 @@ +import styled from 'styled-components'; +import { Box } from '@mui/material'; + +export const StatIconContainer = styled(Box)(({ theme }) => ({ + fontSize: theme.typography.h5.fontSize, + color: theme.palette.texts.action, +})); + +export const Tooltip = styled('div')(({ theme }) => ({ + fontSize: '14px', + padding: theme.spacing(1), + maxWidth: '430px', + border: '1px solid', + borderRadius: '8px', + borderColor: theme.palette.border.primary, + boxShadow: theme.shadows[9], +})); diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx new file mode 100644 index 000000000..d3fdbaf77 --- /dev/null +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx @@ -0,0 +1,185 @@ +import React from 'react'; +import { Grid, Typography } from '@mui/material'; +import { useTranslation } from 'react-i18next'; +import { DataEntityClassNameEnum, type DataEntityDetails } from 'generated-sources'; +import { + UpstreamIcon, + DownstreamIcon, + ActivityCreatedIcon, + ActivityDeletedIcon, +} from 'components/shared/icons'; +import { EntityClassItem, AppTooltip } from 'components/shared/elements'; +import { useGetEDRRelationshipById } from 'lib/hooks/api/dataModelling/relatioships'; +import { RelationshipDatasetInfo } from 'components/shared/elements/Relationships/RelationshipDatasetInfo'; +import { StatIconContainer } from '../OverviewRelationshipStatsStyles'; +import { RelationshipIcon } from '../RelationshipIcon'; +import * as S from '../OverviewRelationshipStatsStyles'; + +interface OverviewEntityRelationshipProps { + dataEntityDetails: DataEntityDetails; +} + +const OverviewEntityRelationship: React.FC = ({ + dataEntityDetails, +}) => { + const { t } = useTranslation(); + const displayedEntitiesNumber = 10; + const { data: relationshipDetails } = useGetEDRRelationshipById(dataEntityDetails.id); + + const sources = relationshipDetails?.erdRelationship.fieldsPairs?.map( + ({ sourceDatasetFieldOddrn }) => ({ + name: sourceDatasetFieldOddrn.split('/').pop(), + oddrn: sourceDatasetFieldOddrn, + }) + ); + + const targets = relationshipDetails?.erdRelationship.fieldsPairs?.map( + ({ targetDatasetFieldOddrn }) => ({ + name: targetDatasetFieldOddrn.split('/').pop(), + oddrn: targetDatasetFieldOddrn, + }) + ); + + return ( + + + + + {relationshipDetails && ( + + + + Source: + + + + + + + + + Target: + + + + + + Cardinality: + + {(relationshipDetails.erdRelationship.cardinality ?? '').replaceAll('_', ' ')} + + + + Is Identifying: + + + {relationshipDetails.erdRelationship.isIdentifying ? ( + + + True + + ) : ( + + + False + + )} + + + )} + + + + + + + + + {sources?.length || 0} + + {t('sources')} + + + {sources?.slice(0, displayedEntitiesNumber).map(target => ( + {target.oddrn}} + checkForOverflow={false} + > + {target.name} + + ))} + + + + + + + + + {targets?.length || 0} + + {t('targets')} + + + {targets?.slice(0, displayedEntitiesNumber).map(target => ( + {target.oddrn}} + checkForOverflow={false} + > + {target.name} + + ))} + + + + + ); +}; + +export default OverviewEntityRelationship; diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewGraphRelationship.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewGraphRelationship.tsx new file mode 100644 index 000000000..28379dfc8 --- /dev/null +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewGraphRelationship.tsx @@ -0,0 +1,112 @@ +import React from 'react'; +import { Grid, Typography } from '@mui/material'; +import { DataEntityClassNameEnum, type DataEntityDetails } from 'generated-sources'; +import { ActivityCreatedIcon, ActivityDeletedIcon } from 'components/shared/icons'; +import { EntityClassItem } from 'components/shared/elements'; +import { useGetGraphRelationshipById } from 'lib/hooks/api/dataModelling/relatioships'; +import { RelationshipDatasetInfo } from 'components/shared/elements/Relationships/RelationshipDatasetInfo'; + +interface OverviewGraphRelationshipProps { + dataEntityDetails: DataEntityDetails; +} + +const OverviewGraphRelationship: React.FC = ({ + dataEntityDetails, +}) => { + const { data: relationshipDetails } = useGetGraphRelationshipById(dataEntityDetails.id); + + return ( + + + + + {relationshipDetails && ( + + + + Source: + + + + + + Target: + + + + + + Is Directed: + + + {relationshipDetails.graphRelationship.isDirected ? ( + + + True + + ) : ( + + + False + + )} + + + )} + + + + Attributes: + + {relationshipDetails?.graphRelationship.attributes?.map(attribute => ( + + + {attribute.name}: + + {attribute.value} + + ))} + + + + ); +}; + +export default OverviewGraphRelationship; diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/RelationshipIcon.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/RelationshipIcon.tsx new file mode 100644 index 000000000..9f219c953 --- /dev/null +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/RelationshipIcon.tsx @@ -0,0 +1,78 @@ +import React from 'react'; +import type { FC } from 'react'; + +interface RelationshipIconProps { + type?: string; +} + +export const RelationshipIcon: FC = ({ type }) => { + switch (type) { + case 'ONE_TO_ZERO_OR_ONE': + return ( + + + + + + + ); + case 'ONE_TO_ONE_OR_MORE': + return ( + + + + + + ); + case 'ONE_TO_ZERO_OR_MORE': + return ( + + + + + + ); + case 'ONE_TO_EXACTLY_ONE': + return ( + + + + + + ); + default: + return <>{type}; + } +}; diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewStats.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewStats.tsx index fd2a683e2..c4ea64acd 100644 --- a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewStats.tsx +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewStats.tsx @@ -9,6 +9,7 @@ import OverviewDataInputStats from './OverviewDataInputStats/OverviewDataInputSt import OverviewDatasetStats from './OverviewDatasetStats/OverviewDatasetStats'; import OverviewTransformerStats from './OverviewTransformerStats/OverviewTransformerStats'; import OverviewQualityTestStats from './OverviewQualityTestStats/OverviewQualityTestStats'; +import OverviewRelationshipStats from './OverviewRelationshipStats/OverviewRelationshipStats'; const OverviewStats: React.FC = () => { const { dataEntityId } = useDataEntityRouteParams(); @@ -68,6 +69,13 @@ const OverviewStats: React.FC = () => { unknownOutputsCount={dataEntityDetails.unknownOutputsCount} /> ); + case DataEntityClassNameEnum.RELATIONSHIP: + return ( + + ); case DataEntityClassNameEnum.ENTITY_GROUP: return ; default: diff --git a/odd-platform-ui/src/components/DataModelling/Relationships/RelationshipsListItem.tsx b/odd-platform-ui/src/components/DataModelling/Relationships/RelationshipsListItem.tsx index cc05d504f..7d46c9c2d 100644 --- a/odd-platform-ui/src/components/DataModelling/Relationships/RelationshipsListItem.tsx +++ b/odd-platform-ui/src/components/DataModelling/Relationships/RelationshipsListItem.tsx @@ -1,8 +1,4 @@ -import type { - DataEntity, - DataEntityRelationship, - DataSourceSafe, -} from 'generated-sources'; +import type { DataEntityRelationship, DataSourceSafe } from 'generated-sources'; import * as Table from 'components/shared/elements/StyledComponents/Table'; import { Typography } from '@mui/material'; import React from 'react'; @@ -10,27 +6,12 @@ import { Link } from 'react-router-dom'; import { dataEntityDetailsPath } from 'routes/dataEntitiesRoutes'; import { DatasourceLogo, EntityTypeItem } from 'components/shared/elements'; import * as S from 'components/shared/styled-components'; +import { RelationshipDatasetInfo } from 'components/shared/elements/Relationships/RelationshipDatasetInfo'; interface Props { item: DataEntityRelationship; } -interface DatasetInfoProps { - dataEntityId?: DataEntity['id']; - oddrn: DataEntity['oddrn']; -} - -const DatasetInfo = ({ dataEntityId, oddrn }: DatasetInfoProps) => - dataEntityId ? ( - - - {oddrn.split('/').pop()} - - - ) : ( - {oddrn} - ); - interface DataSourceInfoProps { dataSource: DataSourceSafe; } @@ -81,13 +62,13 @@ const RelationshipsListItem = ({ item }: Props) => ( - - diff --git a/odd-platform-ui/src/components/shared/elements/Relationships/RelationshipDatasetInfo.tsx b/odd-platform-ui/src/components/shared/elements/Relationships/RelationshipDatasetInfo.tsx new file mode 100644 index 000000000..80901c61e --- /dev/null +++ b/odd-platform-ui/src/components/shared/elements/Relationships/RelationshipDatasetInfo.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import type { DataEntity } from 'generated-sources'; +import { Typography } from '@mui/material'; +import { Link } from 'react-router-dom'; +import { dataEntityDetailsPath } from 'routes/dataEntitiesRoutes'; + +interface RelationshipDatasetInfoProps { + dataEntityId?: DataEntity['id']; + oddrn: DataEntity['oddrn']; +} + +export const RelationshipDatasetInfo = ({ + dataEntityId, + oddrn, +}: RelationshipDatasetInfoProps) => + dataEntityId ? ( + + + {oddrn.split('/').pop()} + + + ) : ( + {oddrn} + ); diff --git a/odd-platform-ui/src/lib/hooks/api/dataModelling/relatioships.ts b/odd-platform-ui/src/lib/hooks/api/dataModelling/relatioships.ts index 5ede84de7..55d285dee 100644 --- a/odd-platform-ui/src/lib/hooks/api/dataModelling/relatioships.ts +++ b/odd-platform-ui/src/lib/hooks/api/dataModelling/relatioships.ts @@ -1,8 +1,22 @@ -import { useInfiniteQuery } from '@tanstack/react-query'; +import { useInfiniteQuery, useQuery } from '@tanstack/react-query'; import { relationshipApi } from 'lib/api'; import type { RelationshipApiGetRelationshipsRequest } from 'generated-sources'; import { addNextPage } from '../utils'; +export function useGetEDRRelationshipById(relationshipId: number) { + return useQuery({ + queryKey: ['getERDRelationshipById', relationshipId], + queryFn: async () => relationshipApi.getERDRelationshipById({ relationshipId }), + }); +} + +export function useGetGraphRelationshipById(relationshipId: number) { + return useQuery({ + queryKey: ['getGraphRelationshipById', relationshipId], + queryFn: async () => relationshipApi.getGraphRelationshipById({ relationshipId }), + }); +} + export function useSearchRelationships({ query, size, diff --git a/odd-platform-ui/src/redux/selectors/dataentity.selectors.ts b/odd-platform-ui/src/redux/selectors/dataentity.selectors.ts index 04f59e455..92adab629 100644 --- a/odd-platform-ui/src/redux/selectors/dataentity.selectors.ts +++ b/odd-platform-ui/src/redux/selectors/dataentity.selectors.ts @@ -44,7 +44,11 @@ export const getIsDataEntityBelongsToClass = (dataEntityId: number | string) => dataEntityClasses?.some(isClassesEquals(DataEntityClassNameEnum.ENTITY_GROUP)) ?? false; - return { isDataset, isQualityTest, isTransformer, isDEG }; + const isRelationship = + dataEntityClasses?.some(isClassesEquals(DataEntityClassNameEnum.RELATIONSHIP)) ?? + false; + + return { isDataset, isQualityTest, isTransformer, isDEG, isRelationship }; }); export const getDataEntityClassesList = createSelector( From ff4d0393372cd3891d21ac0107e8fe3ab8af8166 Mon Sep 17 00:00:00 2001 From: ayemets-corcentric <106543964+ayemets-corcentric@users.noreply.github.com> Date: Sun, 31 Mar 2024 22:47:42 +0200 Subject: [PATCH 3/4] feat(odd-platform-ui): update OverviewEntityRelationship component (#1640) --- .../OverviewEntityRelationship.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx index d3fdbaf77..73fbea456 100644 --- a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx @@ -59,11 +59,11 @@ const OverviewEntityRelationship: React.FC = ({ alignContent='flex-start' > - Source: + Parent: @@ -78,11 +78,11 @@ const OverviewEntityRelationship: React.FC = ({ alignContent='flex-start' > - Target: + Child: @@ -127,7 +127,7 @@ const OverviewEntityRelationship: React.FC = ({ {sources?.length || 0} - {t('sources')} + Referenced Key = ({ {targets?.length || 0} - {t('targets')} + Foreign Key Date: Mon, 1 Apr 2024 11:07:20 +0200 Subject: [PATCH 4/4] chore(odd-platform-up): switch places of target and source (#1640) --- .../OverviewRelationshipType/OverviewEntityRelationship.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx index 73fbea456..42841e88e 100644 --- a/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx +++ b/odd-platform-ui/src/components/DataEntityDetails/Overview/OverviewStats/OverviewRelationshipStats/OverviewRelationshipType/OverviewEntityRelationship.tsx @@ -137,7 +137,7 @@ const OverviewEntityRelationship: React.FC = ({ alignItems='flex-start' sx={{ mt: 1 }} > - {sources?.slice(0, displayedEntitiesNumber).map(target => ( + {targets?.slice(0, displayedEntitiesNumber).map(target => ( {target.oddrn}} @@ -166,7 +166,7 @@ const OverviewEntityRelationship: React.FC = ({ alignItems='flex-start' sx={{ mt: 1 }} > - {targets?.slice(0, displayedEntitiesNumber).map(target => ( + {sources?.slice(0, displayedEntitiesNumber).map(target => ( {target.oddrn}}