From c8e2733f92f700b782a36a08bc4b043df07c309e Mon Sep 17 00:00:00 2001 From: John Joyce Date: Wed, 24 Jan 2024 16:31:57 -0800 Subject: [PATCH] Adding support for entity health --- .../src/app/entity/chart/ChartEntity.tsx | 1 + .../app/entity/dashboard/DashboardEntity.tsx | 1 + .../src/app/entity/dataJob/DataJobEntity.tsx | 1 + .../containers/profile/header/EntityHealth.tsx | 2 +- datahub-web-react/src/graphql/lineage.graphql | 17 +++++++++++++---- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/datahub-web-react/src/app/entity/chart/ChartEntity.tsx b/datahub-web-react/src/app/entity/chart/ChartEntity.tsx index 0ef39dc923e0c1..cd7c408ee23daa 100644 --- a/datahub-web-react/src/app/entity/chart/ChartEntity.tsx +++ b/datahub-web-react/src/app/entity/chart/ChartEntity.tsx @@ -238,6 +238,7 @@ export class ChartEntity implements Entity { icon: entity?.platform?.properties?.logoUrl || undefined, platform: entity?.platform, subtype: entity?.subTypes?.typeNames?.[0] || undefined, + health: entity?.health || undefined, }; }; diff --git a/datahub-web-react/src/app/entity/dashboard/DashboardEntity.tsx b/datahub-web-react/src/app/entity/dashboard/DashboardEntity.tsx index e19f53e4b83649..8e984cc368589e 100644 --- a/datahub-web-react/src/app/entity/dashboard/DashboardEntity.tsx +++ b/datahub-web-react/src/app/entity/dashboard/DashboardEntity.tsx @@ -259,6 +259,7 @@ export class DashboardEntity implements Entity { subtype: entity?.subTypes?.typeNames?.[0] || undefined, icon: entity?.platform?.properties?.logoUrl || undefined, platform: entity?.platform, + health: entity?.health || undefined, }; }; diff --git a/datahub-web-react/src/app/entity/dataJob/DataJobEntity.tsx b/datahub-web-react/src/app/entity/dataJob/DataJobEntity.tsx index d269a6c03ff183..b7ec9834851179 100644 --- a/datahub-web-react/src/app/entity/dataJob/DataJobEntity.tsx +++ b/datahub-web-react/src/app/entity/dataJob/DataJobEntity.tsx @@ -225,6 +225,7 @@ export class DataJobEntity implements Entity { type: EntityType.DataJob, icon: entity?.dataFlow?.platform?.properties?.logoUrl || undefined, platform: entity?.dataFlow?.platform, + health: entity?.health || undefined, }; }; diff --git a/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHealth.tsx b/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHealth.tsx index 30713afa888b84..f534e21d33c832 100644 --- a/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHealth.tsx +++ b/datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHealth.tsx @@ -24,7 +24,7 @@ export const EntityHealth = ({ health, baseUrl, fontSize, tooltipPlacement }: Pr return ( <> {(unhealthy && ( - + {icon} diff --git a/datahub-web-react/src/graphql/lineage.graphql b/datahub-web-react/src/graphql/lineage.graphql index 4e9b8aacfcfa15..86932571fa14f6 100644 --- a/datahub-web-react/src/graphql/lineage.graphql +++ b/datahub-web-react/src/graphql/lineage.graphql @@ -57,6 +57,9 @@ fragment lineageNodeProperties on EntityWithRelationships { } } } + health { + ...entityHealth + } } ... on DataFlow { orchestrator @@ -89,6 +92,9 @@ fragment lineageNodeProperties on EntityWithRelationships { status { removed } + health { + ...entityHealth + } } ... on Dashboard { urn @@ -144,6 +150,9 @@ fragment lineageNodeProperties on EntityWithRelationships { subTypes { typeNames } + health { + ...entityHealth + } } ... on Chart { tool @@ -174,6 +183,9 @@ fragment lineageNodeProperties on EntityWithRelationships { subTypes { typeNames } + health { + ...entityHealth + } } ... on Dataset { name @@ -211,10 +223,7 @@ fragment lineageNodeProperties on EntityWithRelationships { } } health { - type - status - message - causes + ...entityHealth } } ... on MLModelGroup {