diff --git a/catalog-rest-service/src/main/resources/ui/src/assets/img/no-data-placeholder.png b/catalog-rest-service/src/main/resources/ui/src/assets/img/no-data-placeholder.png new file mode 100644 index 00000000000..811fe0accac Binary files /dev/null and b/catalog-rest-service/src/main/resources/ui/src/assets/img/no-data-placeholder.png differ diff --git a/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx b/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx new file mode 100644 index 00000000000..14d7c097f36 --- /dev/null +++ b/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx @@ -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 ( + <> +

+ We are unable to get any results from{' '} + + Elasticsearch. + +

+

Please make sure you ran the Elasticsearch indexing.

+

+ Refer to our{' '} + + docs + {' '} + for Elasticsearch indexing +

+ + ); + }; + + return ( + <> +
+ {' '} + +
+
+

+ {`Hi, ${AppState.userDetails.displayName}!`} +

+ {type === 'noData' && noRecordForES()} + {type === 'error' && ( +

+ OpenMetadata requires Elasticsearch 7+ running and configured in + + openmetadata.yaml. + + Please check the configuration and make sure the Elasticsearch is + running. +

+ )} +
+ + ); +}; + +export default ErrorPlaceHolderES; diff --git a/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx b/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx index 390064b45ae..2206a08842b 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/searched-data/SearchedData.tsx @@ -26,7 +26,7 @@ import { getOwnerFromId, getTierFromSearchTableTags, } 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 PageContainer from '../containers/PageContainer'; import Loader from '../Loader/Loader'; @@ -124,7 +124,7 @@ const SearchedData: React.FC = ({ )} ) : ( - + )} )} diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx index e48befb1ff3..fff1dfcbf5b 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx @@ -28,7 +28,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import { useLocation, useParams } from 'react-router-dom'; import { searchData } from '../../axiosAPIs/miscAPI'; 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 DropDownList from '../../components/dropdown/DropDownList'; import SearchedData from '../../components/searched-data/SearchedData'; @@ -419,7 +419,7 @@ const ExplorePage: React.FC = (): React.ReactElement => { return ( <> {error ? ( - + ) : ( { ) : ( <> {error ? ( - + ) : (