Skip to content

Commit b2d554e

Browse files
[8.x] [Search] Fix autogenerated connector names (#197585) (#197769)
# Backport This will backport the following commits from `main` to `8.x`: - [[Search] Fix autogenerated connector names (#197585)](#197585) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Navarone Feekery","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-25T07:53:16Z","message":"[Search] Fix autogenerated connector names (#197585)\n\nImprove the autogenerated connector names by\r\n\r\n- Re-generating names when changing connector source\r\n- Preventing editing of names after connector is created","sha":"c05e1c58ab7677bf082dc11da040a0c3be4d6498","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Search","backport:prev-major","v8.16.0","v8.17.0"],"title":"[Search] Fix autogenerated connector names","number":197585,"url":"https://github.com/elastic/kibana/pull/197585","mergeCommit":{"message":"[Search] Fix autogenerated connector names (#197585)\n\nImprove the autogenerated connector names by\r\n\r\n- Re-generating names when changing connector source\r\n- Preventing editing of names after connector is created","sha":"c05e1c58ab7677bf082dc11da040a0c3be4d6498"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197585","number":197585,"mergeCommit":{"message":"[Search] Fix autogenerated connector names (#197585)\n\nImprove the autogenerated connector names by\r\n\r\n- Re-generating names when changing connector source\r\n- Preventing editing of names after connector is created","sha":"c05e1c58ab7677bf082dc11da040a0c3be4d6498"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Navarone Feekery <[email protected]>
1 parent a7b19ba commit b2d554e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export const StartStep: React.FC<StartStepProps> = ({
106106
name="first"
107107
value={rawName}
108108
onChange={handleNameChange}
109+
disabled={!!connector}
109110
onBlur={() => {
110111
if (selectedConnector) {
111112
generateConnectorName({

x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ export const NewConnectorLogic = kea<MakeLogicType<NewConnectorValues, NewConnec
143143
}
144144
},
145145
connectorNameGenerated: ({ connectorName }) => {
146-
if (!values.rawName) {
147-
actions.setRawName(connectorName);
148-
}
146+
actions.setRawName(connectorName);
149147
},
150148
createConnector: ({
151149
isSelfManaged,
@@ -191,7 +189,6 @@ export const NewConnectorLogic = kea<MakeLogicType<NewConnectorValues, NewConnec
191189
setSelectedConnector: ({ connector }) => {
192190
if (connector) {
193191
actions.generateConnectorName({
194-
connectorName: values.rawName,
195192
connectorType: connector.serviceType,
196193
});
197194
}

0 commit comments

Comments
 (0)