Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] fix(ui): add external url button for ml entities for v2 #12893

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public MLModelGroupProperties apply(
TimeStampToAuditStampMapper.map(context, mlModelGroupProperties.getLastModified()));
}

if (mlModelGroupProperties.getExternalUrl() != null) {
result.setExternalUrl(mlModelGroupProperties.getExternalUrl().toString());
}

result.setCustomProperties(
CustomPropertiesMapper.map(mlModelGroupProperties.getCustomProperties(), entityUrn));

Expand Down
8 changes: 8 additions & 0 deletions datahub-graphql-core/src/main/resources/entity.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -10112,11 +10112,19 @@ type MLModelGroupProperties {
"""
customProperties: [CustomPropertiesEntry!]

"""
URL to view this model group in the external system
"""
externalUrl: String


"""
Deprecated creation timestamp
@deprecated Use the 'created' field instead
"""
createdAt: Long @deprecated(reason: "Use `created` instead")


}

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const headerDropdownItems = new Set([
EntityMenuItems.SHARE,
EntityMenuItems.UPDATE_DEPRECATION,
EntityMenuItems.ANNOUNCE,
EntityMenuItems.EXTERNAL_URL,
]);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ export class DataProcessInstanceEntity implements Entity<DataProcessInstance> {
// useUpdateQuery={useUpdateDataProcessInstanceMutation}
getOverrideProperties={this.getOverridePropertiesFromEntity}
headerDropdownItems={
new Set([EntityMenuItems.UPDATE_DEPRECATION, EntityMenuItems.RAISE_INCIDENT, EntityMenuItems.SHARE])
new Set([
EntityMenuItems.UPDATE_DEPRECATION,
EntityMenuItems.RAISE_INCIDENT,
EntityMenuItems.SHARE,
EntityMenuItems.EXTERNAL_URL,
])
}
tabs={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const headerDropdownItems = new Set([
EntityMenuItems.RAISE_INCIDENT,
EntityMenuItems.ANNOUNCE,
EntityMenuItems.LINK_VERSION,
EntityMenuItems.EXTERNAL_URL,
]);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const headerDropdownItems = new Set([
EntityMenuItems.SHARE,
EntityMenuItems.UPDATE_DEPRECATION,
EntityMenuItems.ANNOUNCE,
EntityMenuItems.EXTERNAL_URL,
]);

/**
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/graphql/dataProcessInstance.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ fragment dataProcessInstanceFields on DataProcessInstance {
key
value
}
externalUrl
}
mlTrainingRunProperties {
id
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/graphql/mlModelGroup.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ query getMLModelGroup($urn: String!) {
time
actor
}
externalUrl
}
...nonRecursiveMLModelGroupFields
incoming: relationships(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import com.linkedin.common.Time
import com.linkedin.common.VersionTag
import com.linkedin.common.CustomProperties
import com.linkedin.common.TimeStamp
import com.linkedin.common.ExternalReference

/**
* Properties associated with an ML Model Group
*/
@Aspect = {
"name": "mlModelGroupProperties"
}
record MLModelGroupProperties includes CustomProperties, MLModelLineageInfo {
record MLModelGroupProperties includes CustomProperties, MLModelLineageInfo, ExternalReference {

/**
* Display name of the MLModelGroup
Expand Down
Loading
Loading