Skip to content

Commit

Permalink
feat(ui): Adding slack handle to corp group info (datahub-project#5645)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 authored Aug 15, 2022
1 parent b496994 commit be22455
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.linkedin.datahub.graphql.types.corpgroup.mappers;

import com.linkedin.data.template.GetMode;
import com.linkedin.datahub.graphql.generated.CorpGroupProperties;
import com.linkedin.datahub.graphql.types.mappers.ModelMapper;

Expand All @@ -24,6 +25,7 @@ public CorpGroupProperties apply(@Nonnull final com.linkedin.identity.CorpGroupI
result.setEmail(info.getEmail());
result.setDescription(info.getDescription());
result.setDisplayName(info.getDisplayName());
result.setSlack(info.getSlack(GetMode.DEFAULT));
return result;
}
}
5 changes: 5 additions & 0 deletions datahub-graphql-core/src/main/resources/entity.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3224,6 +3224,11 @@ type CorpGroupProperties {
email of this group
"""
email: String

"""
Slack handle for the group
"""
slack: String
}

"""
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/src/app/entity/group/GroupProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function GroupProfile() {
data?.corpGroup?.info?.displayName ||
undefined,
email: data?.corpGroup?.editableProperties?.email || data?.corpGroup?.properties?.email || undefined,
slack: data?.corpGroup?.editableProperties?.slack || undefined,
slack: data?.corpGroup?.editableProperties?.slack || data?.corpGroup?.properties?.slack || undefined,
aboutText:
data?.corpGroup?.editableProperties?.description || data?.corpGroup?.properties?.description || undefined,
groupMemberRelationships: groupMemberRelationships as EntityRelationshipsResult,
Expand Down
3 changes: 2 additions & 1 deletion datahub-web-react/src/graphql/group.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ query getGroup($urn: String!, $membersCount: Int!) {
displayName
description
email
slack
}
ownership {
...ownershipFields
Expand Down Expand Up @@ -217,4 +218,4 @@ mutation updateCorpGroupProperties($urn: String!, $input: CorpGroupUpdateInput!)
updateCorpGroupProperties(urn: $urn, input: $input) {
urn
}
}
}
3 changes: 2 additions & 1 deletion metadata-ingestion/examples/mce_files/bootstrap_mce.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"email": "[email protected]",
"admins": ["urn:li:corpuser:jdoe", "urn:li:corpuser:datahub"],
"members": ["urn:li:corpuser:jdoe", "urn:li:corpuser:datahub"],
"groups": []
"groups": [],
"slack": "bfoo-squad"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@ record CorpGroupInfo {
}
description: optional string

/**
* Slack channel for the group
*/
slack: optional string
}
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
},
Expand Down Expand Up @@ -1891,6 +1891,11 @@
"Searchable" : {
"fieldType" : "TEXT_PARTIAL"
}
}, {
"name" : "slack",
"type" : "string",
"doc" : "Slack channel for the group",
"optional" : true
} ],
"Aspect" : {
"EntityUrns" : [ "com.linkedin.common.CorpGroupUrn" ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
},
Expand Down Expand Up @@ -2139,6 +2139,11 @@
"Searchable" : {
"fieldType" : "TEXT_PARTIAL"
}
}, {
"name" : "slack",
"type" : "string",
"doc" : "Slack channel for the group",
"optional" : true
} ],
"Aspect" : {
"EntityUrns" : [ "com.linkedin.common.CorpGroupUrn" ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
}, "com.linkedin.common.Time", "com.linkedin.common.Urn", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
}, "com.linkedin.common.Time", "com.linkedin.common.Urn", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
},
Expand Down Expand Up @@ -1642,6 +1642,11 @@
"Searchable" : {
"fieldType" : "TEXT_PARTIAL"
}
}, {
"name" : "slack",
"type" : "string",
"doc" : "Slack channel for the group",
"optional" : true
} ],
"Aspect" : {
"EntityUrns" : [ "com.linkedin.common.CorpGroupUrn" ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
}, {
"name" : "message",
"type" : "string",
"doc" : "Additional message to keep track of in the event",
"doc" : "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
"optional" : true
} ]
},
Expand Down Expand Up @@ -2133,6 +2133,11 @@
"Searchable" : {
"fieldType" : "TEXT_PARTIAL"
}
}, {
"name" : "slack",
"type" : "string",
"doc" : "Slack channel for the group",
"optional" : true
} ],
"Aspect" : {
"EntityUrns" : [ "com.linkedin.common.CorpGroupUrn" ],
Expand Down

0 comments on commit be22455

Please sign in to comment.