-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(dashboard): add subTypes aspect to dashboard entity #5843
feat(dashboard): add subTypes aspect to dashboard entity #5843
Conversation
2e3fac2
to
3a9ce80
Compare
We have not forgotten about this- will be reviewing soon |
5563d96
to
06c9408
Compare
@@ -179,6 +182,7 @@ export class DashboardEntity implements Entity<Dashboard> { | |||
statsSummary={data.statsSummary} | |||
lastUpdatedMs={data.properties?.lastModified?.time} | |||
createdMs={data.properties?.created?.time} | |||
subtype={data.subTypes?.typeNames?.[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is safe in the case that subTypes is an empty array ([])
@@ -214,6 +218,7 @@ export class DashboardEntity implements Entity<Dashboard> { | |||
inputFields={data.inputFields} | |||
/> | |||
} | |||
subtype={data.subTypes?.typeNames?.[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -223,6 +228,7 @@ export class DashboardEntity implements Entity<Dashboard> { | |||
urn: entity.urn, | |||
name: entity.properties?.name || '', | |||
type: EntityType.Dashboard, | |||
subtype: entity?.subTypes?.typeNames?.[0] || undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -71,7 +73,7 @@ export const DashboardPreview = ({ | |||
url={entityRegistry.getEntityUrl(EntityType.Dashboard, urn)} | |||
name={name || ''} | |||
description={description || ''} | |||
type="Dashboard" | |||
type={capitalizeFirstLetterOnly(subtype) || 'Dashboard'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe if subType is null or undefined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all this looks good. Only thing is the case where subtypes is present but empty.
Currently that's not a "normal" state of the system, but since our Ingest endpoint is freely available someone could technical produce this aspect (or remove an existing subtype).
We want the system to be resilient to such cases. It may mean refactoring other code (Dataset / Container code) to also make safer calls
After giving it some thought, I think we can merge this in and then our team can wholistically address these issues. Once this passes CI, we can merge it and we will take the followups. Thanks! |
I am currently working on a source for the SAP Analytics Cloud to ingest dashboards. The SAP Analytics Cloud has two types of dashboards with a different set of features: Stories and Analytic Applications
This PR adds the subTypes aspect to the dashboard entity to distinguish between these two (sub)types of dashboards.
Checklist