diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx index b5b87aa7e2bc3..0d797329093c8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx @@ -24,6 +24,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { INGESTION_METHOD_IDS } from '../../../../../common/constants'; import { generateEncodedPath } from '../../../shared/encode_path_params'; +import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; import { handlePageChange } from '../../../shared/table_pagination'; import { @@ -35,6 +36,8 @@ import { import { EnterpriseSearchContentPageTemplate } from '../layout'; import { SelectConnector } from '../new_index/select_connector/select_connector'; +import { CannotConnect } from '../search_index/components/cannot_connect'; + import { ConnectorStats } from './connector_stats'; import { ConnectorsLogic } from './connectors_logic'; import { ConnectorsTable } from './connectors_table'; @@ -52,6 +55,7 @@ export interface ConnectorsProps { export const Connectors: React.FC = ({ isCrawler }) => { const { fetchConnectors, onPaginate, setIsFirstRequest } = useActions(ConnectorsLogic); const { data, isLoading, searchParams, isEmpty, connectors } = useValues(ConnectorsLogic); + const { errorConnectingMessage } = useValues(HttpLogic); const [searchQuery, setSearchValue] = useState(''); useEffect(() => { @@ -122,6 +126,7 @@ export const Connectors: React.FC = ({ isCrawler }) => { ] : [ = ({ isCrawler }) => { ], }} > + {Boolean(errorConnectingMessage) && ( + <> + + + + )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx index 83395c2cf6e5d..d929cf6cbffa5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx @@ -6,14 +6,18 @@ */ import React from 'react'; +import { useValues } from 'kea'; + import { EuiButton, EuiEmptyPrompt, EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { generateEncodedPath } from '../../../shared/encode_path_params'; +import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; import { NEW_INDEX_METHOD_PATH } from '../../routes'; export const CrawlerEmptyState: React.FC = () => { + const { errorConnectingMessage } = useValues(HttpLogic); return ( { actions={ diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx index 8b77da27959d0..9e7702379a9a8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx @@ -13,6 +13,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { Status } from '../../../../../../common/types/api'; import { docLinks } from '../../../../shared/doc_links'; +import { HttpLogic } from '../../../../shared/http'; import { KibanaLogic } from '../../../../shared/kibana'; import { LicensingLogic } from '../../../../shared/licensing'; import { @@ -20,6 +21,7 @@ import { LICENSING_FEATURE, } from '../../../../shared/licensing_callout/licensing_callout'; import { CreateCrawlerIndexApiLogic } from '../../../api/crawler/create_crawler_index_api_logic'; +import { CannotConnect } from '../../search_index/components/cannot_connect'; import { NewSearchIndexTemplate } from '../new_search_index_template'; import { MethodCrawlerLogic } from './method_crawler_logic'; @@ -29,6 +31,7 @@ export const MethodCrawler: React.FC = () => { const { makeRequest } = useActions(CreateCrawlerIndexApiLogic); const { isCloud } = useValues(KibanaLogic); const { hasPlatinumLicense } = useValues(LicensingLogic); + const { errorConnectingMessage } = useValues(HttpLogic); const isGated = !isCloud && !hasPlatinumLicense; @@ -41,11 +44,16 @@ export const MethodCrawler: React.FC = () => { )} + {Boolean(errorConnectingMessage) && ( + + + + )} makeRequest({ indexName, language })} - disabled={isGated} + disabled={isGated || Boolean(errorConnectingMessage)} buttonLoading={status === Status.LOADING} docsUrl={docLinks.crawlerOverview} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx index a559f42131c82..5ad862d9befd9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx @@ -147,7 +147,9 @@ export const NewSearchIndexPage: React.FC = () => { {getTitle(type, serviceType)} - {getConnectorModeBadge(isNative)} + {type === INGESTION_METHOD_IDS.CONNECTOR && ( + {getConnectorModeBadge(isNative)} + )} ), }}