diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.component.tsx index c3a7274099e..e6f310b1f85 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.component.tsx @@ -16,7 +16,7 @@ import { faChevronRight, } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Space } from 'antd'; +import { Empty, Space } from 'antd'; import classNames from 'classnames'; import { lowerCase } from 'lodash'; import React, { @@ -26,6 +26,7 @@ import React, { useRef, useState, } from 'react'; +import { Link } from 'react-router-dom'; import { TableData } from '../../generated/entity/data/table'; import { withLoader } from '../../hoc/withLoader'; import { isEven } from '../../utils/CommonUtils'; @@ -151,7 +152,26 @@ const SampleDataTable: FunctionComponent = ({ sampleData }: Props) => { ) : (
- No sample data available + +

No sample data available

+

+ To view Sample Data, run the Profiler Ingestion. Please + refer to this doc to schedule the{' '} + + Profiler Ingestion + +

+ + } + />
)} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.test.tsx index 8141eb80068..2ad01f2dc55 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTable/SampleDataTable.test.tsx @@ -37,6 +37,10 @@ const mockSampleData = { ], }; +jest.mock('react-router-dom', () => ({ + Link: jest.fn().mockImplementation(({ children }) => {children}), +})); + describe('Test SampleDataTable Component', () => { it('Renders all the data that was sent to the component', () => { const { container } = render( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.test.tsx index 377ba2e0847..7acb8810c68 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.test.tsx @@ -20,6 +20,10 @@ const mockSampleData = { messages: ['{"email":"data","name":"job"}'], }; +jest.mock('react-router-dom', () => ({ + Link: jest.fn().mockImplementation(({ children }) => {children}), +})); + describe('Test SampleData Component', () => { it('Should render message cards', () => { const { getAllByTestId } = render( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.tsx b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.tsx index 0eb3f4a5943..17c02e2a3ef 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/SampleDataTopic/SampleDataTopic.tsx @@ -12,8 +12,10 @@ */ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Empty } from 'antd'; import { isUndefined } from 'lodash'; import React, { FC, HTMLAttributes, useState } from 'react'; +import { Link } from 'react-router-dom'; import { TopicSampleData } from '../../generated/entity/data/topic'; import { withLoader } from '../../hoc/withLoader'; import SchemaEditor from '../schema-editor/SchemaEditor'; @@ -82,7 +84,26 @@ const SampleDataTopic: FC = ({ sampleData }) => {
- No sample data available + +

No sample data available

+

+ To view Sample Data, run the MetaData Ingestion. Please refer to + this doc to schedule the{' '} + + MetaData Ingestion + +

+ + } + />
); }