Skip to content

Commit

Permalink
Merge pull request #2385 from rszwajko/autoUpdates
Browse files Browse the repository at this point in the history
CNV-47203: Display Automatic subscription section with incomplete data
  • Loading branch information
openshift-merge-bot[bot] authored Jan 23, 2025
2 parents b136684 + fe5a66a commit 72d6a41
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const AutomaticSubscriptionRHELGuests: FC<AutomaticSubscriptionRHELGuestsProps>
}
}, [type, selected]);

if (loading) return null;
const isInitialLoad = loading && featureEnabled === null;

return (
<ExpandSection
Expand Down Expand Up @@ -78,9 +78,12 @@ const AutomaticSubscriptionRHELGuests: FC<AutomaticSubscriptionRHELGuestsProps>
'Automatically pull updates from the RHEL repository. Activation key and Organization ID are mandatory to enable this.',
)}
turnOnSwitch={(val) => {
toggleFeature(val);
if (!loading) {
toggleFeature(val);
}
}}
id={AUTOMATIC_UPDATE_FEATURE_NAME}
isDisabled={isInitialLoad}
switchIsOn={featureEnabled}
title={t('Enable auto updates for RHEL VirtualMachines')}
/>
Expand Down

0 comments on commit 72d6a41

Please sign in to comment.