Skip to content

Commit

Permalink
Fix for storage cluster creation fail - review 1
Browse files Browse the repository at this point in the history
Signed-off-by: Gowtham Shanmugasundaram <gshanmug@redhat.com>
  • Loading branch information
Gowtham Shanmugasundaram authored and GowthamShanmugam committed Jan 4, 2021
1 parent 2f99fde commit cf01817
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ export const EncryptionFormGroup: React.FC<EncryptionFormGroupProps> = ({
}, [encryption.clusterWide, encryption.storageClass, encryptionChecked]);

const toggleEncryption = (checked: boolean) => {
const encryptOj = {
const payload = {
...encryption,
clusterWide: checked,
}
if(!checked){
encryptOj.advanced = false;
}
setEncryptionDispatch(ActionType.SET_ENCRYPTION, mode, dispatch, encryptOj);
setEncryptionChecked(checked);
if (!checked) {
};
if (!checked) {
payload.advanced = false;
payload.hasHandled = false;
payload.storageClass = false;
setEncryptionDispatch(ActionType.CLEAR_KMS_STATE, mode, dispatch);
}
setEncryptionDispatch(ActionType.SET_ENCRYPTION, mode, dispatch, payload);
setEncryptionChecked(checked);
};

const toggleClusterWideEncryption = (checked: boolean) => {
Expand Down

0 comments on commit cf01817

Please sign in to comment.