Skip to content

Commit

Permalink
fix(ui): show soft deleted status of containers (#6072)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe-lyons authored Sep 28, 2022
1 parent eae86a6 commit 129a27a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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())));
Expand Down
9 changes: 7 additions & 2 deletions datahub-graphql-core/src/main/resources/entity.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,11 @@ type Container implements Entity {
Edges extending from this entity
"""
relationships(input: RelationshipsInput!): EntityRelationshipsResult

"""
Status metadata of the container
"""
status: Status
}

"""
Expand Down Expand Up @@ -8066,7 +8071,7 @@ type MLModelGroup implements EntityWithRelationships & Entity & BrowsableEntity
ownership: Ownership

"""
Status metadata of the MLFeature
Status metadata of the MLModelGroup
"""
status: Status

Expand Down Expand Up @@ -9379,4 +9384,4 @@ input AcceptRoleInput {
The token needed to accept the role
"""
inviteToken: String!
}
}
4 changes: 3 additions & 1 deletion datahub-web-react/src/graphql/container.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ query getContainer($urn: String!) {
dataPlatformInstance {
...dataPlatformInstanceFields
}

status {
removed
}
}
}

0 comments on commit 129a27a

Please sign in to comment.