From bcfff6b5bdd970d788b89d8dc15187cf7447ec4c Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:59:56 +1100 Subject: [PATCH] [8.16] [Search][Connectors] Elastic managed as default and some typos (#197571) (#198465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Backport This will backport the following commits from `main` to `8.16`: - [[Search][Connectors] Elastic managed as default and some typos (#197571)](https://github.com/elastic/kibana/pull/197571) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: José Luis González --- .../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 a4ed43e2a8fc..6e83bf98c237 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(