Skip to content

Commit

Permalink
Merge branch 'master' into openapi-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Aug 16, 2023
2 parents 37aa80d + 526e626 commit 7e88dad
Show file tree
Hide file tree
Showing 71 changed files with 1,119 additions and 271 deletions.
2 changes: 2 additions & 0 deletions datahub-web-react/src/app/entity/chart/ChartEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ export class ChartEntity implements Entity<Chart> {
createdMs={data.properties?.created?.time}
externalUrl={data.properties?.externalUrl}
snippet={<ChartSnippet matchedFields={result.matchedFields} inputFields={data.inputFields} />}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Deprecation,
ChartStatsSummary,
DataProduct,
EntityPath,
} from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { useEntityRegistry } from '../../../useEntityRegistry';
Expand Down Expand Up @@ -40,6 +41,8 @@ export const ChartPreview = ({
externalUrl,
parentContainers,
snippet,
degree,
paths,
}: {
urn: string;
platform?: string;
Expand All @@ -62,6 +65,8 @@ export const ChartPreview = ({
externalUrl?: string | null;
parentContainers?: ParentContainersResult | null;
snippet?: React.ReactNode | null;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();

Expand Down Expand Up @@ -96,6 +101,8 @@ export const ChartPreview = ({
createdMs={createdMs}
/>
}
degree={degree}
paths={paths}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export class ContainerEntity implements Entity<Container> {
externalUrl={data.properties?.externalUrl}
tags={data.tags}
glossaryTerms={data.glossaryTerms}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Deprecation,
GlossaryTerms,
DataProduct,
EntityPath,
} from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { capitalizeFirstLetterOnly } from '../../../shared/textUtil';
Expand Down Expand Up @@ -44,6 +45,8 @@ export const Preview = ({
parentContainers,
externalUrl,
deprecation,
degree,
paths,
}: {
urn: string;
name: string;
Expand All @@ -64,6 +67,8 @@ export const Preview = ({
deprecation?: Deprecation | null;
parentContainers?: ParentContainersResult | null;
externalUrl?: string | null;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();
const typeName = capitalizeFirstLetterOnly(subTypes?.typeNames?.[0]) || 'Container';
Expand Down Expand Up @@ -97,6 +102,8 @@ export const Preview = ({
]) ||
undefined
}
degree={degree}
paths={paths}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ export class DashboardEntity implements Entity<Dashboard> {
/>
}
subtype={data.subTypes?.typeNames?.[0]}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Deprecation,
DashboardStatsSummary,
DataProduct,
EntityPath,
} from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { useEntityRegistry } from '../../../useEntityRegistry';
Expand Down Expand Up @@ -43,6 +44,8 @@ export const DashboardPreview = ({
parentContainers,
deprecation,
snippet,
degree,
paths,
}: {
urn: string;
platform?: string;
Expand All @@ -67,6 +70,8 @@ export const DashboardPreview = ({
externalUrl?: string | null;
parentContainers?: ParentContainersResult | null;
snippet?: React.ReactNode | null;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();

Expand Down Expand Up @@ -103,6 +108,8 @@ export const DashboardPreview = ({
createdMs={createdMs}
/>
}
degree={degree}
paths={paths}
/>
);
};
2 changes: 2 additions & 0 deletions datahub-web-react/src/app/entity/dataFlow/DataFlowEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ export class DataFlowEntity implements Entity<DataFlow> {
externalUrl={data.properties?.externalUrl}
jobCount={(data as any).childJobs?.total}
deprecation={data.deprecation}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
7 changes: 7 additions & 0 deletions datahub-web-react/src/app/entity/dataFlow/preview/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
DataProduct,
Deprecation,
Domain,
EntityPath,
EntityType,
GlobalTags,
Owner,
Expand Down Expand Up @@ -35,6 +36,8 @@ export const Preview = ({
insights,
jobCount,
deprecation,
degree,
paths,
}: {
urn: string;
name: string;
Expand All @@ -51,6 +54,8 @@ export const Preview = ({
snippet?: React.ReactNode | null;
insights?: Array<SearchInsight> | null;
jobCount?: number | null;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();
return (
Expand Down Expand Up @@ -80,6 +85,8 @@ export const Preview = ({
]) ||
undefined
}
degree={degree}
paths={paths}
/>
);
};
2 changes: 2 additions & 0 deletions datahub-web-react/src/app/entity/dataJob/DataJobEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ export class DataJobEntity implements Entity<DataJob> {
lastRunTimeMs={
((data as any).lastRun?.runs?.length && (data as any).lastRun?.runs[0]?.created?.time) || undefined
}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
7 changes: 7 additions & 0 deletions datahub-web-react/src/app/entity/dataJob/preview/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
DataProduct,
Deprecation,
Domain,
EntityPath,
EntityType,
GlobalTags,
Owner,
Expand Down Expand Up @@ -38,6 +39,8 @@ export const Preview = ({
insights,
lastRunTimeMs,
externalUrl,
degree,
paths,
}: {
urn: string;
name: string;
Expand All @@ -54,6 +57,8 @@ export const Preview = ({
insights?: Array<SearchInsight> | null;
lastRunTimeMs?: number | null;
externalUrl?: string | null;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();
return (
Expand Down Expand Up @@ -85,6 +90,8 @@ export const Preview = ({
]) ||
undefined
}
degree={degree}
paths={paths}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ export class DataProductEntity implements Entity<DataProduct> {
domain={data.domain?.domain}
entityCount={data?.entities?.total || undefined}
externalUrl={data.properties?.externalUrl}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { EntityType, Owner, GlobalTags, GlossaryTerms, Domain } from '../../../../types.generated';
import { EntityType, Owner, GlobalTags, GlossaryTerms, Domain, EntityPath } from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { useEntityRegistry } from '../../../useEntityRegistry';
import { IconStyleType } from '../../Entity';
Expand All @@ -14,6 +14,8 @@ interface Props {
glossaryTerms?: GlossaryTerms | null;
entityCount?: number;
externalUrl?: string | null;
degree?: number;
paths?: EntityPath[];
}

export const Preview = ({
Expand All @@ -26,6 +28,8 @@ export const Preview = ({
glossaryTerms,
entityCount,
externalUrl,
degree,
paths,
}: Props): JSX.Element => {
const entityRegistry = useEntityRegistry();

Expand All @@ -45,6 +49,8 @@ export const Preview = ({
entityCount={entityCount}
externalUrl={externalUrl}
displayAssetCount
degree={degree}
paths={paths}
/>
);
};
2 changes: 2 additions & 0 deletions datahub-web-react/src/app/entity/dataset/DatasetEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ export class DatasetEntity implements Entity<Dataset> {
(data as any).lastOperation?.length && (data as any).lastOperation[0].lastUpdatedTimestamp
}
health={data.health}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
7 changes: 7 additions & 0 deletions datahub-web-react/src/app/entity/dataset/preview/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
DatasetStatsSummary,
DataProduct,
Health,
EntityPath,
} from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { useEntityRegistry } from '../../../useEntityRegistry';
Expand Down Expand Up @@ -49,6 +50,8 @@ export const Preview = ({
statsSummary,
lastUpdatedMs,
health,
degree,
paths,
}: {
urn: string;
name: string;
Expand Down Expand Up @@ -77,6 +80,8 @@ export const Preview = ({
statsSummary?: DatasetStatsSummary | null;
lastUpdatedMs?: number | null;
health?: Health[] | null;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();
return (
Expand Down Expand Up @@ -114,6 +119,8 @@ export const Preview = ({
/>
}
health={health || undefined}
degree={degree}
paths={paths}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export class MLFeatureEntity implements Entity<MlFeature> {
dataProduct={getDataProduct(genericProperties?.dataProduct)}
platform={platform}
platformInstanceId={data.dataPlatformInstance?.instanceId}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { DataPlatform, DataProduct, EntityType, Owner } from '../../../../types.generated';
import { DataPlatform, DataProduct, EntityPath, EntityType, Owner } from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { capitalizeFirstLetterOnly } from '../../../shared/textUtil';
import { useEntityRegistry } from '../../../useEntityRegistry';
Expand All @@ -14,6 +14,8 @@ export const Preview = ({
dataProduct,
owners,
platform,
degree,
paths,
}: {
urn: string;
name: string;
Expand All @@ -23,6 +25,8 @@ export const Preview = ({
dataProduct?: DataProduct | null;
owners?: Array<Owner> | null;
platform?: DataPlatform | null | undefined;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();
return (
Expand All @@ -40,6 +44,8 @@ export const Preview = ({
typeIcon={entityRegistry.getIcon(EntityType.Mlfeature, 14, IconStyleType.ACCENT)}
owners={owners}
dataProduct={dataProduct}
degree={degree}
paths={paths}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ export class MLFeatureTableEntity implements Entity<MlFeatureTable> {
platformName={data.platform?.properties?.displayName || capitalizeFirstLetterOnly(data.platform?.name)}
platformInstanceId={data.dataPlatformInstance?.instanceId}
dataProduct={getDataProduct(genericProperties?.dataProduct)}
degree={(result as any).degree}
paths={(result as any).paths}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { DataProduct, EntityType, Owner } from '../../../../types.generated';
import { DataProduct, EntityPath, EntityType, Owner } from '../../../../types.generated';
import DefaultPreviewCard from '../../../preview/DefaultPreviewCard';
import { useEntityRegistry } from '../../../useEntityRegistry';
import { IconStyleType } from '../../Entity';
Expand All @@ -13,6 +13,8 @@ export const Preview = ({
platformName,
dataProduct,
platformInstanceId,
degree,
paths,
}: {
urn: string;
name: string;
Expand All @@ -22,6 +24,8 @@ export const Preview = ({
platformName?: string | null;
dataProduct?: DataProduct | null;
platformInstanceId?: string;
degree?: number;
paths?: EntityPath[];
}): JSX.Element => {
const entityRegistry = useEntityRegistry();
return (
Expand All @@ -38,6 +42,8 @@ export const Preview = ({
platformInstanceId={platformInstanceId}
dataProduct={dataProduct}
logoComponent={entityRegistry.getIcon(EntityType.MlfeatureTable, 20, IconStyleType.HIGHLIGHT)}
degree={degree}
paths={paths}
/>
);
};
Loading

0 comments on commit 7e88dad

Please sign in to comment.