diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx index 9e0aed3fa75f..f91a8eff670f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx @@ -6,7 +6,10 @@ */ import React, { useState } from 'react'; +import { css } from '@emotion/react'; + import { + EuiButton, EuiButtonIcon, EuiCallOut, EuiFlexGroup, @@ -83,13 +86,15 @@ const connectorClientPopoverPanels = [ ]; export interface ConnectorDescriptionPopoverProps { - isDisabled: boolean; isNative: boolean; + isRunningLocally?: boolean; + showIsOnlySelfManaged: boolean; } export const ConnectorDescriptionPopover: React.FC = ({ isNative, - isDisabled, + isRunningLocally, + showIsOnlySelfManaged, }) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); const panels = isNative ? nativePopoverPanels : connectorClientPopoverPanels; @@ -111,55 +116,115 @@ export const ConnectorDescriptionPopover: React.FC - - {isDisabled && ( - - - + {(showIsOnlySelfManaged || isRunningLocally) && ( + <> + + + - + size="s" + iconType="warning" + color="warning" + /> + + + + + )} + + {!isRunningLocally && ( + + {panels.map((panel) => { + return ( + + + + + {panel.icons.map((icon, index) => ( + + {icon} + + ))} + + + + +

{panel.description}

+
+
+
+
+ ); + })}
)} - - - {panels.map((panel) => { - return ( - - - - - {panel.icons.map((icon, index) => ( - - {icon} - - ))} - - - - -

{panel.description}

-
-
-
+ {isRunningLocally && ( + <> + + + + +

+ {i18n.translate( + 'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.learnMore', + { defaultMessage: 'Explore Elastic Cloud with your 14-day free trial' } + )} +

+
- ); - })} -
+ + + {i18n.translate( + 'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.learnMore', + { + defaultMessage: + 'Take advantage of Elastic managed connectors and generative AI capabilities to address search challenges across your organization in real time, at scale.', + } + )} + + + + + {i18n.translate('xpack.enterpriseSearch.createConnector.startTrialButtonLabel', { + defaultMessage: 'Start free trial', + })} + + +
+ + )}
); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx index 6e83bf98c237..095990c823f0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx @@ -65,9 +65,14 @@ export const CreateConnector: React.FC = () => { const { setCurrentStep } = useActions(NewConnectorLogic); const stepStates = generateStepState(currentStep); + const { config } = useValues(KibanaLogic); + const isRunningLocally = (config.host ?? '').includes('localhost'); + useEffect(() => { - // TODO: separate this to ability and preference - if (selectedConnector && !selectedConnector.isNative && selfManagePreference === 'native') { + if ( + (selectedConnector && !selectedConnector.isNative && selfManagePreference === 'native') || + isRunningLocally + ) { setSelfManagePreference('selfManaged'); } }, [selectedConnector]); @@ -141,6 +146,7 @@ export const CreateConnector: React.FC = () => { setSelfManagePreference(preference); }} error={errorToText(error)} + isRunningLocally={isRunningLocally} /> ), }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx index 46840d577e4d..ce42c19453ff 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx @@ -41,6 +41,7 @@ import { SelfManagePreference } from './create_connector'; interface StartStepProps { error?: string | React.ReactNode; + isRunningLocally: boolean; onSelfManagePreferenceChange(preference: SelfManagePreference): void; selfManagePreference: SelfManagePreference; setCurrentStep: Function; @@ -49,6 +50,7 @@ interface StartStepProps { export const StartStep: React.FC = ({ title, + isRunningLocally, selfManagePreference, setCurrentStep, onSelfManagePreferenceChange, @@ -208,14 +210,15 @@ export const StartStep: React.FC = ({ { defaultMessage: 'Elastic managed' } )} checked={selfManagePreference === 'native'} - disabled={selectedConnector?.isNative === false} + disabled={selectedConnector?.isNative === false || isRunningLocally} onChange={() => onSelfManagePreferenceChange('native')} name="setUp" /> @@ -233,7 +236,7 @@ export const StartStep: React.FC = ({ /> - + diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 141f0513bf84..c32522cef9ce 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -18433,7 +18433,6 @@ "xpack.enterpriseSearch.createConnector.configurationStep.configurationLabel": "Configuration", "xpack.enterpriseSearch.createConnector.configurationStep.h4.finishUpLabel": "Terminer", "xpack.enterpriseSearch.createConnector.configurationStep.p.description": "Vous pouvez synchroniser manuellement vos données, planifier une synchronisation récurrente ou gérer vos domaines.", - "xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.notAvailableTitle": "Ce connecteur n'est pas disponible en tant que connecteur géré par Elastic", "xpack.enterpriseSearch.createConnector.connectorDocsLinkLabel": "référence du connecteur", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.description": "Maintenant, configurez votre robot Elastic et synchronisez les données.", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.title": "Configuration", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index e3740459ff87..b1d13acf8a42 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -18407,7 +18407,6 @@ "xpack.enterpriseSearch.createConnector.configurationStep.configurationLabel": "構成", "xpack.enterpriseSearch.createConnector.configurationStep.h4.finishUpLabel": "終了", "xpack.enterpriseSearch.createConnector.configurationStep.p.description": "データを手動で同期したり、繰り返し同期をスケジュールしたり、ドメインを管理したりできます。", - "xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.notAvailableTitle": "このコネクターは、Elasticマネージドコネクターとして利用できません。", "xpack.enterpriseSearch.createConnector.connectorDocsLinkLabel": "コネクター参照", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.description": "次に、Elasticクローラーを構成し、データを同期します。", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.title": "構成", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index a93665d17565..284939c29f80 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -18450,7 +18450,6 @@ "xpack.enterpriseSearch.createConnector.configurationStep.configurationLabel": "配置", "xpack.enterpriseSearch.createConnector.configurationStep.h4.finishUpLabel": "结束", "xpack.enterpriseSearch.createConnector.configurationStep.p.description": "您可以手动同步数据,计划重复同步或管理您的域。", - "xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.notAvailableTitle": "此连接器不可用作 Elastic 托管连接器", "xpack.enterpriseSearch.createConnector.connectorDocsLinkLabel": "连接器参考", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.description": "立即配置您的 Elastic 网络爬虫并同步数据。", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.title": "配置",