Skip to content

Commit

Permalink
[8.16] [Search][Connectors] Disable setup options after creating conf…
Browse files Browse the repository at this point in the history
…iguration (elastic#203374) (elastic#203393)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Search][Connectors] Disable setup options after creating
configuration (elastic#203374)](elastic#203374)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"José Luis
González","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T11:15:54Z","message":"[Search][Connectors]
Disable setup options after creating configuration (elastic#203374)\n\n##
Summary\r\n\r\nThis PR disables the _Elastic managed_ and _Self-managed_
setup options\r\nafter clicking the _Generate configuration_ button in
order to avoid the\r\nerror described in this
ticket\r\nhttps://github.com/elastic/search-team/issues/8665 when
changing\r\ndeployment method after generating the
config.\r\n\r\n![CleanShot 2024-12-09 at 10
32\r\n08@2x](https://github.com/user-attachments/assets/dafea7ac-5d50-44a0-a59d-03ee29043dec)","sha":"9b6af1c1887f83d821d6fc639715ad4be593fea7","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:version","v8.17.0","v8.18.0","v8.16.2","v8.16.3"],"title":"[Search][Connectors]
Disable setup options after creating
configuration","number":203374,"url":"https://github.com/elastic/kibana/pull/203374","mergeCommit":{"message":"[Search][Connectors]
Disable setup options after creating configuration (elastic#203374)\n\n##
Summary\r\n\r\nThis PR disables the _Elastic managed_ and _Self-managed_
setup options\r\nafter clicking the _Generate configuration_ button in
order to avoid the\r\nerror described in this
ticket\r\nhttps://github.com/elastic/search-team/issues/8665 when
changing\r\ndeployment method after generating the
config.\r\n\r\n![CleanShot 2024-12-09 at 10
32\r\n08@2x](https://github.com/user-attachments/assets/dafea7ac-5d50-44a0-a59d-03ee29043dec)","sha":"9b6af1c1887f83d821d6fc639715ad4be593fea7"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203374","number":203374,"mergeCommit":{"message":"[Search][Connectors]
Disable setup options after creating configuration (elastic#203374)\n\n##
Summary\r\n\r\nThis PR disables the _Elastic managed_ and _Self-managed_
setup options\r\nafter clicking the _Generate configuration_ button in
order to avoid the\r\nerror described in this
ticket\r\nhttps://github.com/elastic/search-team/issues/8665 when
changing\r\ndeployment method after generating the
config.\r\n\r\n![CleanShot 2024-12-09 at 10
32\r\n08@2x](https://github.com/user-attachments/assets/dafea7ac-5d50-44a0-a59d-03ee29043dec)","sha":"9b6af1c1887f83d821d6fc639715ad4be593fea7"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: José Luis González <[email protected]>
  • Loading branch information
kibanamachine and JoseLuisGJ authored Dec 9, 2024
1 parent f3f31f4 commit 011e630
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const StartStep: React.FC<StartStepProps> = ({
generatedConfigData,
isGenerateLoading,
isCreateLoading,
isFormDirty,
} = useValues(NewConnectorLogic);
const { setRawName, createConnector, generateConnectorName, setFormDirty } =
useActions(NewConnectorLogic);
Expand Down Expand Up @@ -210,7 +211,9 @@ export const StartStep: React.FC<StartStepProps> = ({
{ defaultMessage: 'Elastic managed' }
)}
checked={selfManagePreference === 'native'}
disabled={selectedConnector?.isNative === false || isRunningLocally}
disabled={
selectedConnector?.isNative === false || isRunningLocally || isFormDirty
}
onChange={() => onSelfManagePreferenceChange('native')}
name="setUp"
/>
Expand All @@ -231,6 +234,7 @@ export const StartStep: React.FC<StartStepProps> = ({
{ defaultMessage: 'Self-managed' }
)}
checked={selfManagePreference === 'selfManaged'}
disabled={isFormDirty}
onChange={() => onSelfManagePreferenceChange('selfManaged')}
name="setUp"
/>
Expand Down

0 comments on commit 011e630

Please sign in to comment.