Skip to content

Commit

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

## Summary

This PR disables the _Elastic managed_ and _Self-managed_ setup options
after clicking the _Generate configuration_ button in order to avoid the
error described in this ticket
elastic/search-team#8665 when changing
deployment method after generating the config.

![CleanShot 2024-12-09 at 10 32
08@2x](https://github.com/user-attachments/assets/dafea7ac-5d50-44a0-a59d-03ee29043dec)
  • Loading branch information
JoseLuisGJ authored Dec 9, 2024
1 parent 313f973 commit 9b6af1c
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 @@ -211,7 +212,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 @@ -232,6 +235,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 9b6af1c

Please sign in to comment.