From 4c999f4ce7c74b154ecdadfc769592a1a8b05599 Mon Sep 17 00:00:00 2001 From: Gabe Lyons Date: Tue, 27 Sep 2022 22:26:33 -0700 Subject: [PATCH] fix(ui): show soft deleted status of containers (#6072) --- .../graphql/types/container/mappers/ContainerMapper.java | 7 +++++++ datahub-graphql-core/src/main/resources/entity.graphql | 9 +++++++-- datahub-web-react/src/graphql/container.graphql | 4 +++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/container/mappers/ContainerMapper.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/container/mappers/ContainerMapper.java index f4f17df8bc7393..a61369e79224d3 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/container/mappers/ContainerMapper.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/container/mappers/ContainerMapper.java @@ -6,6 +6,7 @@ import com.linkedin.common.GlossaryTerms; import com.linkedin.common.InstitutionalMemory; import com.linkedin.common.Ownership; +import com.linkedin.common.Status; import com.linkedin.common.SubTypes; import com.linkedin.common.urn.Urn; import com.linkedin.container.ContainerProperties; @@ -19,6 +20,7 @@ import com.linkedin.datahub.graphql.types.common.mappers.InstitutionalMemoryMapper; import com.linkedin.datahub.graphql.types.common.mappers.OwnershipMapper; import com.linkedin.datahub.graphql.types.common.mappers.CustomPropertiesMapper; +import com.linkedin.datahub.graphql.types.common.mappers.StatusMapper; import com.linkedin.datahub.graphql.types.common.mappers.util.SystemMetadataUtils; import com.linkedin.datahub.graphql.types.domain.DomainAssociationMapper; import com.linkedin.datahub.graphql.types.glossary.mappers.GlossaryTermsMapper; @@ -88,6 +90,11 @@ public static Container map(final EntityResponse entityResponse) { result.setInstitutionalMemory(InstitutionalMemoryMapper.map(new InstitutionalMemory(envelopedInstitutionalMemory.getValue().data()))); } + final EnvelopedAspect statusAspect = aspects.get(Constants.STATUS_ASPECT_NAME); + if (statusAspect != null) { + result.setStatus(StatusMapper.map(new Status(statusAspect.getValue().data()))); + } + final EnvelopedAspect envelopedSubTypes = aspects.get(Constants.SUB_TYPES_ASPECT_NAME); if (envelopedSubTypes != null) { result.setSubTypes(mapSubTypes(new SubTypes(envelopedSubTypes.getValue().data()))); diff --git a/datahub-graphql-core/src/main/resources/entity.graphql b/datahub-graphql-core/src/main/resources/entity.graphql index 8a231eaa2854e6..58613e0b92f743 100644 --- a/datahub-graphql-core/src/main/resources/entity.graphql +++ b/datahub-graphql-core/src/main/resources/entity.graphql @@ -1954,6 +1954,11 @@ type Container implements Entity { Edges extending from this entity """ relationships(input: RelationshipsInput!): EntityRelationshipsResult + + """ + Status metadata of the container + """ + status: Status } """ @@ -8066,7 +8071,7 @@ type MLModelGroup implements EntityWithRelationships & Entity & BrowsableEntity ownership: Ownership """ - Status metadata of the MLFeature + Status metadata of the MLModelGroup """ status: Status @@ -9379,4 +9384,4 @@ input AcceptRoleInput { The token needed to accept the role """ inviteToken: String! -} \ No newline at end of file +} diff --git a/datahub-web-react/src/graphql/container.graphql b/datahub-web-react/src/graphql/container.graphql index c9168d48db2862..5597da247114e9 100644 --- a/datahub-web-react/src/graphql/container.graphql +++ b/datahub-web-react/src/graphql/container.graphql @@ -49,6 +49,8 @@ query getContainer($urn: String!) { dataPlatformInstance { ...dataPlatformInstanceFields } - + status { + removed + } } }