Skip to content

Commit

Permalink
[8.16] [Search] Fix autogenerated connector names (#197585) (#197768)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.16`:
- [[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]>
  • Loading branch information
kibanamachine and navarone-feekery authored Oct 25, 2024
1 parent bf6acbd commit 59e1317
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const StartStep: React.FC<StartStepProps> = ({
name="first"
value={rawName}
onChange={handleNameChange}
disabled={!!connector}
onBlur={() => {
if (selectedConnector) {
generateConnectorName({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ export const NewConnectorLogic = kea<MakeLogicType<NewConnectorValues, NewConnec
}
},
connectorNameGenerated: ({ connectorName }) => {
if (!values.rawName) {
actions.setRawName(connectorName);
}
actions.setRawName(connectorName);
},
createConnector: ({
isSelfManaged,
Expand Down Expand Up @@ -191,7 +189,6 @@ export const NewConnectorLogic = kea<MakeLogicType<NewConnectorValues, NewConnec
setSelectedConnector: ({ connector }) => {
if (connector) {
actions.generateConnectorName({
connectorName: values.rawName,
connectorType: connector.serviceType,
});
}
Expand Down

0 comments on commit 59e1317

Please sign in to comment.