import * as React from 'react'; import { ShareAltOutlined } from '@ant-design/icons'; import { DataFlow, EntityType, SearchResult } from '../../../types.generated'; import { Preview } from './preview/Preview'; import { DataFlowProfile } from './profile/DataFlowProfile'; import { Entity, IconStyleType, PreviewType } from '../Entity'; import { getLogoFromPlatform } from '../../shared/getLogoFromPlatform'; /** * Definition of the DataHub DataFlow entity. */ export class DataFlowEntity implements Entity { type: EntityType = EntityType.DataFlow; icon = (fontSize: number, styleType: IconStyleType) => { if (styleType === IconStyleType.TAB_VIEW) { return ; } if (styleType === IconStyleType.HIGHLIGHT) { return ; } return ( ); }; isSearchEnabled = () => true; isBrowseEnabled = () => true; isLineageEnabled = () => false; getAutoCompleteFieldName = () => 'name'; getPathName = () => 'pipelines'; getCollectionName = () => 'Pipelines'; renderProfile = (urn: string) => ; renderPreview = (_: PreviewType, data: DataFlow) => { const platformName = data.orchestrator.charAt(0).toUpperCase() + data.orchestrator.slice(1); return ( ); }; renderSearch = (result: SearchResult) => { const data = result.entity as DataFlow; const platformName = data.orchestrator.charAt(0).toUpperCase() + data.orchestrator.slice(1); return ( ); }; }