diff --git a/x-pack/plugins/enterprise_search/common/types/connectors.ts b/x-pack/plugins/enterprise_search/common/types/connectors.ts index 2f5b47c824c9d..655322e86f1b5 100644 --- a/x-pack/plugins/enterprise_search/common/types/connectors.ts +++ b/x-pack/plugins/enterprise_search/common/types/connectors.ts @@ -41,6 +41,7 @@ export interface IngestPipelineParams { export interface Connector { api_key_id: string | null; configuration: ConnectorConfiguration; + error: string | null; id: string; index_name: string; is_native: boolean; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts index 4d3f2aa884fab..457f37f5d13a9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts @@ -27,6 +27,7 @@ export const indices: ElasticsearchIndexWithIngestion[] = [ connector: { api_key_id: null, configuration: { foo: { label: 'bar', value: 'barbar' } }, + error: null, id: '2', index_name: 'connector', is_native: false, @@ -75,6 +76,7 @@ export const indices: ElasticsearchIndexWithIngestion[] = [ connector: { api_key_id: null, configuration: { foo: { label: 'bar', value: 'barbar' } }, + error: null, id: '4', index_name: 'connector-crawler', is_native: true, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts index 7deb9b563ce56..52901d3e067c9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/view_index.mock.ts @@ -36,6 +36,7 @@ export const connectorIndex: ConnectorViewIndex = { connector: { api_key_id: null, configuration: { foo: { label: 'bar', value: 'barbar' } }, + error: null, id: '2', index_name: 'connector', is_native: false, @@ -90,6 +91,7 @@ export const connectorCrawlerIndex: CrawlerViewIndex = { connector: { api_key_id: null, configuration: { foo: { label: 'bar', value: 'barbar' } }, + error: null, id: '4', index_name: 'connector-crawler', is_native: true, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx index c0b392b646626..f30c9a24dda92 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { useValues } from 'kea'; -import { EuiSpacer } from '@elastic/eui'; +import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -30,6 +30,24 @@ export const SearchIndexOverview: React.FC = () => { return ( <> + {isConnectorIndex(indexData) && indexData.connector.error && ( + <> + + + {indexData.connector.error} + + + + )} {isCrawlerIndex(indexData) ? ( ) : ( diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts index 24b01c5e0bf03..d8a0ace2603dd 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts @@ -86,6 +86,7 @@ describe('addConnector lib function', () => { document: { api_key_id: null, configuration: {}, + error: null, index_name: 'index_name', is_native: false, language: 'fr', @@ -215,6 +216,7 @@ describe('addConnector lib function', () => { document: { api_key_id: null, configuration: {}, + error: null, index_name: 'index_name', is_native: true, language: null, @@ -266,6 +268,7 @@ describe('addConnector lib function', () => { document: { api_key_id: null, configuration: {}, + error: null, index_name: 'search-index_name', is_native: false, language: 'en', diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts index 6838ef95ce936..63c4d1834c4f4 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts @@ -87,6 +87,7 @@ export const addConnector = async ( const document: ConnectorDocument = { api_key_id: null, configuration: {}, + error: null, index_name: input.index_name, is_native: input.is_native, language: input.language, diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/start_sync.test.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/start_sync.test.ts index a1212fc04fdce..144a9b1dbc8b3 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/start_sync.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/start_sync.test.ts @@ -35,6 +35,7 @@ describe('addConnector lib function', () => { api_key_id: null, configuration: {}, created_at: null, + error: null, index_name: 'index_name', last_seen: null, last_sync_error: null, @@ -58,6 +59,7 @@ describe('addConnector lib function', () => { api_key_id: null, configuration: {}, created_at: null, + error: null, index_name: 'index_name', last_seen: null, last_sync_error: null, diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/update_connector_scheduling.test.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/update_connector_scheduling.test.ts index 86845b090bf93..68d3f7b17ef58 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/update_connector_scheduling.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/update_connector_scheduling.test.ts @@ -34,6 +34,7 @@ describe('addConnector lib function', () => { api_key_id: null, configuration: {}, created_at: null, + error: null, index_name: 'index_name', last_seen: null, last_sync_error: null, @@ -60,6 +61,7 @@ describe('addConnector lib function', () => { api_key_id: null, configuration: {}, created_at: null, + error: null, index_name: 'index_name', last_seen: null, last_sync_error: null,