diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx index 09814ebab8b7c..3f05c4d305110 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx @@ -96,307 +96,278 @@ export const ConnectorConfiguration: React.FC = () => { - - ) : ( - i18n.translate( - 'xpack.enterpriseSearch.content.connectorDetail.configuration.apiKey.noApiKeyLabel', - { - defaultMessage: - 'Before you can generate an API key, you need to attach an index. Scroll to the bottom of this page for instructions.', - } - ) - ), - status: hasApiKey ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.generateApiKey.title', + { + <> + + + + } + {connector.index_name && ( + <> + + - - - - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.configurationFileLink', - { defaultMessage: 'example config file' } - )} - - ), - }} - /> - - - - {getConnectorTemplate({ - apiKeyData, - connectorData: { - id: connector.id, - service_type: connector.service_type, - }, - host: cloudContext.elasticsearchUrl, - })} - - - - - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.deploymentModeLink', - { defaultMessage: 'documentation' } - )} - - ), - }} + children: ( + - - - ), - status: - !connector.status || connector.status === ConnectorStatus.CREATED - ? 'incomplete' - : 'complete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.deployConnector.title', + ), + status: hasApiKey ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.generateApiKey.title', + { + defaultMessage: 'Generate an API key', + } + ), + titleSize: 'xs', + }, { - defaultMessage: 'Set up and deploy connector', - } - ), - titleSize: 'xs', - }, - { - children: ( - - updateConnectorConfiguration({ - configuration, - connectorId: connector.id, - }) - } - subscriptionLink={docLinks.licenseManagement} - stackManagementLink={http.basePath.prepend( - '/app/management/stack/license_management' - )} - > - {!connector.status || connector.status === ConnectorStatus.CREATED ? ( - - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.waitingForConnectorText', - { - defaultMessage: - 'Your connector has not connected to Search. Troubleshoot your configuration and refresh the page.', - } - )} - - fetchConnector({ connectorId: connector.id })} - isLoading={isLoading} - > - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.waitingForConnector.button.label', - { - defaultMessage: 'Recheck now', - } - )} - - - ) : ( - - )} - - {connector.status && hasAdvancedFilteringFeature && !!advancedSnippet && ( - + + + + {i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.configurationFileLink', + { defaultMessage: 'example config file' } + )} + + ), + }} + /> + + + + {getConnectorTemplate({ + apiKeyData, + connectorData: { + id: connector.id, + service_type: connector.service_type, + }, + host: cloudContext.elasticsearchUrl, + })} + + + + + {i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.deploymentModeLink', + { defaultMessage: 'documentation' } + )} + + ), + }} + /> + + + ), + status: + !connector.status || connector.status === ConnectorStatus.CREATED + ? 'incomplete' + : 'complete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.deployConnector.title', + { + defaultMessage: 'Set up and deploy connector', + } + ), + titleSize: 'xs', + }, + { + children: ( + + updateConnectorConfiguration({ + configuration, + connectorId: connector.id, + }) + } + subscriptionLink={docLinks.licenseManagement} + stackManagementLink={http.basePath.prepend( + '/app/management/stack/license_management' )} - iconType="iInCircle" - color="warning" > - - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.advancedSyncRulesDocs', - { defaultMessage: 'Advanced Sync Rules' } - )} - - ), - }} - /> - - )} - - ), - status: - connector.status === ConnectorStatus.CONNECTED ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.enhance.title', - { - defaultMessage: 'Configure your connector', - } - ), - titleSize: 'xs', - }, - { - children: ( - - {!connector.index_name && ( - - - - + {!connector.status || connector.status === ConnectorStatus.CREATED ? ( + {i18n.translate( - 'xpack.enterpriseSearch.content.connectors.configuration.connectorNoIndexCallOut.description', + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.waitingForConnectorText', { defaultMessage: - "You won't be able to start syncing content until your connector is attached to an index.", + 'Your connector has not connected to Search. Troubleshoot your configuration and refresh the page.', } )} - - - - - )} - - - {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.scheduleSync.description', - { - defaultMessage: - 'Finalize your connector by triggering a one-time sync, or setting a recurring sync to keep your data source in sync over time', - } + + fetchConnector({ connectorId: connector.id })} + isLoading={isLoading} + > + {i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.waitingForConnector.button.label', + { + defaultMessage: 'Recheck now', + } + )} + + + ) : ( + )} - - - - - - + {connector.status && hasAdvancedFilteringFeature && !!advancedSnippet && ( + + + {i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.connectorPackage.advancedSyncRulesDocs', + { defaultMessage: 'Advanced Sync Rules' } + )} + + ), + }} + /> + + )} + + ), + status: + connector.status === ConnectorStatus.CONNECTED ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.enhance.title', + { + defaultMessage: 'Configure your connector', + } + ), + titleSize: 'xs', + }, + { + children: ( + + + {i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.schedule.button.label', + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.scheduleSync.description', { - defaultMessage: 'Set schedule and sync', + defaultMessage: + 'Finalize your connector by triggering a one-time sync, or setting a recurring sync to keep your data source in sync over time', } )} - + - - + + + + + {i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.schedule.button.label', + { + defaultMessage: 'Set schedule and sync', + } + )} + + + + + + - - - ), - status: connector.scheduling.full.enabled ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.schedule.title', - { - defaultMessage: 'Sync your data', - } - ), - titleSize: 'xs', - }, - ]} - /> + ), + status: connector.scheduling.full.enabled ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.connector_detail.configurationConnector.steps.schedule.title', + { + defaultMessage: 'Sync your data', + } + ), + titleSize: 'xs', + }, + ]} + /> + + )} - { - <> - - - - } diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx index cc89fc84c2432..4660ad75fe905 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx @@ -142,106 +142,111 @@ export const NativeConnectorConfiguration: React.FC = () => { )} - , - status: hasResearched ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.researchConfigurationTitle', + { + <> + + + + } + {connector.index_name && ( + <> + + - ), - status: hasConfigured ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.configurationTitle', + children: , + status: hasResearched ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.researchConfigurationTitle', + { + defaultMessage: 'Research configuration requirements', + } + ), + titleSize: 'xs', + }, { - defaultMessage: 'Configuration', - } - ), - titleSize: 'xs', - }, - { - children: ( - - ), - status: hasApiKey ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.manageApiKeyTitle', + children: ( + + ), + status: hasConfigured ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.configurationTitle', + { + defaultMessage: 'Configuration', + } + ), + titleSize: 'xs', + }, { - defaultMessage: 'Manage API key', - } - ), - titleSize: 'xs', - }, - { - children: ( - - - - - - - - - - - {i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.schedulingButtonLabel', - { - defaultMessage: 'Set schedule and sync', - } - )} - + children: ( + + ), + status: hasApiKey ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.manageApiKeyTitle', + { + defaultMessage: 'Manage API key', + } + ), + titleSize: 'xs', + }, + { + children: ( + + + + + - - + + + + + {i18n.translate( + 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.schedulingButtonLabel', + { + defaultMessage: 'Set schedule and sync', + } + )} + + + + + + - - - ), - status: hasConfiguredAdvanced ? 'complete' : 'incomplete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.advancedConfigurationTitle', - { - defaultMessage: 'Sync your data', - } - ), - titleSize: 'xs', - }, - ]} - /> + ), + status: hasConfiguredAdvanced ? 'complete' : 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.advancedConfigurationTitle', + { + defaultMessage: 'Sync your data', + } + ), + titleSize: 'xs', + }, + ]} + /> + + )} - { - <> - - - - }