From 4100cb14765c17e7302b4ead59d7f0c9c8f76003 Mon Sep 17 00:00:00 2001 From: Navarone Feekery <13634519+navarone-feekery@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:52:42 +0200 Subject: [PATCH] Fix autogenerated connector names --- .../components/connectors/create_connector/start_step.tsx | 1 + .../new_index/method_connector/new_connector_logic.ts | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) 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 633ea8f58d25c..fc48e51904085 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 @@ -106,6 +106,7 @@ export const StartStep: React.FC = ({ name="first" value={rawName} onChange={handleNameChange} + disabled={!!connector} onBlur={() => { if (selectedConnector) { generateConnectorName({ diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts index da2dcb1198800..796a2a64ab56c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts @@ -143,9 +143,7 @@ export const NewConnectorLogic = kea { - if (!values.rawName) { - actions.setRawName(connectorName); - } + actions.setRawName(connectorName); }, createConnector: ({ isSelfManaged, @@ -191,7 +189,6 @@ export const NewConnectorLogic = kea { if (connector) { actions.generateConnectorName({ - connectorName: values.rawName, connectorType: connector.serviceType, }); }