import { DashboardFilled, DashboardOutlined } from '@ant-design/icons'; import * as React from 'react'; import { Dashboard, EntityType, SearchResult } from '../../../types.generated'; import { Entity, IconStyleType, PreviewType } from '../Entity'; import { DashboardPreview } from './preview/DashboardPreview'; import DashboardProfile from './profile/DashboardProfile'; /** * Definition of the DataHub Dashboard entity. */ export class DashboardEntity implements Entity { type: EntityType = EntityType.Dashboard; icon = (fontSize: number, styleType: IconStyleType) => { if (styleType === IconStyleType.TAB_VIEW) { return ; } if (styleType === IconStyleType.HIGHLIGHT) { return ; } return ( ); }; isSearchEnabled = () => true; isBrowseEnabled = () => true; getAutoCompleteFieldName = () => 'title'; getPathName = () => 'dashboard'; getCollectionName = () => 'Dashboards'; renderProfile = (urn: string) => ; renderPreview = (_: PreviewType, data: Dashboard) => { return ( ); }; renderSearch = (result: SearchResult) => { return this.renderPreview(PreviewType.SEARCH, result.entity as Dashboard); }; }