From 4d642e509e9da2b6781d5b0bf5ab059b8ce05a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?= Date: Thu, 31 Oct 2024 09:11:39 +0100 Subject: [PATCH] [Search][Connectors] Elastic managed as default and some typos (#197571) ## Summary Fixing **Elastic managed** as a default option when creating a new connector. And fixing _Self managed_ typo to become _Self-managed_ --------- Co-authored-by: Elastic Machine (cherry picked from commit 7dea07f90dd41d0c69586393afbd0f2496479212) --- .../connectors/create_connector/create_connector.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 a4ed43e2a8fcd..6e83bf98c2371 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 @@ -67,10 +67,8 @@ export const CreateConnector: React.FC = () => { useEffect(() => { // TODO: separate this to ability and preference - if (!selectedConnector?.isNative || !selfManagePreference) { + if (selectedConnector && !selectedConnector.isNative && selfManagePreference === 'native') { setSelfManagePreference('selfManaged'); - } else { - setSelfManagePreference('native'); } }, [selectedConnector]); @@ -276,11 +274,11 @@ export const CreateConnector: React.FC = () => { - {selfManagePreference + {selfManagePreference === 'selfManaged' ? i18n.translate( 'xpack.enterpriseSearch.createConnector.badgeType.selfManaged', { - defaultMessage: 'Self managed', + defaultMessage: 'Self-managed', } ) : i18n.translate(