import * as React from 'react'; import { DotChartOutlined } from '@ant-design/icons'; import { MlFeatureTable, EntityType, SearchResult, OwnershipType } from '../../../types.generated'; import { Preview } from './preview/Preview'; import { Entity, EntityCapabilityType, IconStyleType, PreviewType } from '../Entity'; import { getDataForEntityType } from '../shared/containers/profile/utils'; import { GenericEntityProperties } from '../shared/types'; import { useGetMlFeatureTableQuery } from '../../../graphql/mlFeatureTable.generated'; import { EntityProfile } from '../shared/containers/profile/EntityProfile'; import { SidebarDomainSection } from '../shared/containers/profile/sidebar/Domain/SidebarDomainSection'; import { SidebarOwnerSection } from '../shared/containers/profile/sidebar/Ownership/SidebarOwnerSection'; import { SidebarAboutSection } from '../shared/containers/profile/sidebar/SidebarAboutSection'; import { SidebarTagsSection } from '../shared/containers/profile/sidebar/SidebarTagsSection'; import MlFeatureTableFeatures from './profile/features/MlFeatureTableFeatures'; import Sources from './profile/Sources'; import { DocumentationTab } from '../shared/tabs/Documentation/DocumentationTab'; import { PropertiesTab } from '../shared/tabs/Properties/PropertiesTab'; import { EntityMenuItems } from '../shared/EntityDropdown/EntityDropdown'; import { capitalizeFirstLetterOnly } from '../../shared/textUtil'; /** * Definition of the DataHub MLFeatureTable entity. */ export class MLFeatureTableEntity implements Entity { type: EntityType = EntityType.MlfeatureTable; icon = (fontSize: number, styleType: IconStyleType) => { if (styleType === IconStyleType.TAB_VIEW) { return ; } if (styleType === IconStyleType.HIGHLIGHT) { return ; } return ( ); }; isSearchEnabled = () => true; isBrowseEnabled = () => true; isLineageEnabled = () => true; getAutoCompleteFieldName = () => 'name'; getPathName = () => 'featureTables'; getEntityName = () => 'Feature Table'; getCollectionName = () => 'Feature Tables'; getOverridePropertiesFromEntity = (_?: MlFeatureTable | null): GenericEntityProperties => { return {}; }; renderProfile = (urn: string) => ( ); renderPreview = (_: PreviewType, data: MlFeatureTable) => { return ( ); }; renderSearch = (result: SearchResult) => { const data = result.entity as MlFeatureTable; return ( ); }; getLineageVizConfig = (entity: MlFeatureTable) => { return { urn: entity.urn, name: entity.name, type: EntityType.MlfeatureTable, icon: entity.platform.properties?.logoUrl || undefined, platform: entity.platform, }; }; displayName = (data: MlFeatureTable) => { return data.name || data.urn; }; getGenericEntityProperties = (mlFeatureTable: MlFeatureTable) => { return getDataForEntityType({ data: mlFeatureTable, entityType: this.type, getOverrideProperties: (data) => data, }); }; supportedCapabilities = () => { return new Set([ EntityCapabilityType.OWNERS, EntityCapabilityType.GLOSSARY_TERMS, EntityCapabilityType.TAGS, EntityCapabilityType.DOMAINS, EntityCapabilityType.DEPRECATION, EntityCapabilityType.SOFT_DELETE, ]); }; }