mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
issue 382:- added error place holder for no data found and connection issue (#395)
This commit is contained in:
parent
59c74fffcd
commit
dbe60628f8
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
@ -0,0 +1,65 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import AppState from '../../../AppState';
|
||||||
|
import NoDataFoundPlaceHolder from '../../../assets/img/no-data-placeholder.png';
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
type: 'error' | 'noData';
|
||||||
|
};
|
||||||
|
|
||||||
|
const ErrorPlaceHolderES = ({ type }: Props) => {
|
||||||
|
const noRecordForES = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<p>
|
||||||
|
We are unable to get any results from{' '}
|
||||||
|
<a
|
||||||
|
className="tw-text-primary tw-font-medium"
|
||||||
|
href="https://docs.open-metadata.org/install/metadata-ingestion/connectors/elastic-search"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank">
|
||||||
|
Elasticsearch.
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p>Please make sure you ran the Elasticsearch indexing.</p>
|
||||||
|
<p>
|
||||||
|
Refer to our{' '}
|
||||||
|
<a
|
||||||
|
className="tw-text-primary tw-font-medium"
|
||||||
|
href="https://docs.open-metadata.org/install/metadata-ingestion/connectors/elastic-search"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank">
|
||||||
|
docs
|
||||||
|
</a>{' '}
|
||||||
|
for Elasticsearch indexing
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="tw-flex tw-flex-col tw-mt-24 tw-place-items-center">
|
||||||
|
{' '}
|
||||||
|
<img src={NoDataFoundPlaceHolder} width={200} />
|
||||||
|
</div>
|
||||||
|
<div className="tw-flex tw-flex-col tw-items-center tw-mt-10 tw-text-base tw-font-normal">
|
||||||
|
<p className="tw-text-lg tw-font-bold tw-mb-1 tw-text-primary">
|
||||||
|
{`Hi, ${AppState.userDetails.displayName}!`}
|
||||||
|
</p>
|
||||||
|
{type === 'noData' && noRecordForES()}
|
||||||
|
{type === 'error' && (
|
||||||
|
<p className="tw-max-w-sm tw-text-center">
|
||||||
|
OpenMetadata requires Elasticsearch 7+ running and configured in
|
||||||
|
<span className="tw-text-primary tw-font-medium tw-mx-1">
|
||||||
|
openmetadata.yaml.
|
||||||
|
</span>
|
||||||
|
Please check the configuration and make sure the Elasticsearch is
|
||||||
|
running.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ErrorPlaceHolderES;
|
@ -26,7 +26,7 @@ import {
|
|||||||
getOwnerFromId,
|
getOwnerFromId,
|
||||||
getTierFromSearchTableTags,
|
getTierFromSearchTableTags,
|
||||||
} from '../../utils/TableUtils';
|
} from '../../utils/TableUtils';
|
||||||
import ErrorPlaceHolder from '../common/error-with-placeholder/ErrorPlaceHolder';
|
import ErrorPlaceHolderES from '../common/error-with-placeholder/ErrorPlaceHolderES';
|
||||||
import TableDataCard from '../common/table-data-card/TableDataCard';
|
import TableDataCard from '../common/table-data-card/TableDataCard';
|
||||||
import PageContainer from '../containers/PageContainer';
|
import PageContainer from '../containers/PageContainer';
|
||||||
import Loader from '../Loader/Loader';
|
import Loader from '../Loader/Loader';
|
||||||
@ -124,7 +124,7 @@ const SearchedData: React.FC<SearchedDataProp> = ({
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<ErrorPlaceHolder />
|
<ErrorPlaceHolderES type="noData" />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -28,7 +28,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|||||||
import { useLocation, useParams } from 'react-router-dom';
|
import { useLocation, useParams } from 'react-router-dom';
|
||||||
import { searchData } from '../../axiosAPIs/miscAPI';
|
import { searchData } from '../../axiosAPIs/miscAPI';
|
||||||
import { Button } from '../../components/buttons/Button/Button';
|
import { Button } from '../../components/buttons/Button/Button';
|
||||||
import Error from '../../components/common/error/Error';
|
import ErrorPlaceHolderES from '../../components/common/error-with-placeholder/ErrorPlaceHolderES';
|
||||||
import FacetFilter from '../../components/common/facetfilter/FacetFilter';
|
import FacetFilter from '../../components/common/facetfilter/FacetFilter';
|
||||||
import DropDownList from '../../components/dropdown/DropDownList';
|
import DropDownList from '../../components/dropdown/DropDownList';
|
||||||
import SearchedData from '../../components/searched-data/SearchedData';
|
import SearchedData from '../../components/searched-data/SearchedData';
|
||||||
@ -419,7 +419,7 @@ const ExplorePage: React.FC = (): React.ReactElement => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{error ? (
|
{error ? (
|
||||||
<Error error={error} />
|
<ErrorPlaceHolderES type="error" />
|
||||||
) : (
|
) : (
|
||||||
<SearchedData
|
<SearchedData
|
||||||
showResultCount
|
showResultCount
|
||||||
|
@ -22,7 +22,7 @@ import { FormatedTableData, SearchResponse } from 'Models';
|
|||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import AppState from '../../AppState';
|
import AppState from '../../AppState';
|
||||||
import { searchData } from '../../axiosAPIs/miscAPI';
|
import { searchData } from '../../axiosAPIs/miscAPI';
|
||||||
import Error from '../../components/common/error/Error';
|
import ErrorPlaceHolderES from '../../components/common/error-with-placeholder/ErrorPlaceHolderES';
|
||||||
import Loader from '../../components/Loader/Loader';
|
import Loader from '../../components/Loader/Loader';
|
||||||
import MyDataHeader from '../../components/my-data/MyDataHeader';
|
import MyDataHeader from '../../components/my-data/MyDataHeader';
|
||||||
import SearchedData from '../../components/searched-data/SearchedData';
|
import SearchedData from '../../components/searched-data/SearchedData';
|
||||||
@ -151,7 +151,7 @@ const MyDataPage: React.FC = (): React.ReactElement => {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{error ? (
|
{error ? (
|
||||||
<Error error={error} />
|
<ErrorPlaceHolderES type="error" />
|
||||||
) : (
|
) : (
|
||||||
<SearchedData
|
<SearchedData
|
||||||
showOnboardingTemplate
|
showOnboardingTemplate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user