Skip to content

Commit

Permalink
Add preview badge to CNV operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ammont82 committed Sep 26, 2024
1 parent f4300b5 commit ac143fd
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@ import CnvHostRequirements from './CnvHostRequirements';
import { getCnvIncompatibleWithLvmReason } from '../../featureSupportLevels/featureStateUtils';
import { OcmCheckboxField } from '../../ui/OcmFormFields';
import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels';
import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service';

const CNV_FIELD_NAME = 'useContainerNativeVirtualization';

type CnvLabelProps = {
clusterId: string;
disabledReason?: string;
isVersionEqualsOrMajorThan4_15: boolean;
supportLevel?: SupportLevel;
};

const CnvLabel = ({
clusterId,
disabledReason,
isVersionEqualsOrMajorThan4_15,
}: {
clusterId: ClusterOperatorProps['clusterId'];
disabledReason?: string;
isVersionEqualsOrMajorThan4_15: boolean;
}) => {
supportLevel,
}: CnvLabelProps) => {
return (
<>
<Tooltip hidden={!disabledReason} content={disabledReason}>
Expand All @@ -40,6 +46,7 @@ const CnvLabel = ({
/>
}
/>
<NewFeatureSupportLevelBadge featureId="CNV" supportLevel={supportLevel} />
</>
);
};
Expand Down Expand Up @@ -88,6 +95,7 @@ const CnvCheckbox = ({
clusterId={clusterId}
disabledReason={disabledReason}
isVersionEqualsOrMajorThan4_15={isVersionEqualsOrMajorThan4_15}
supportLevel={featureSupportLevel.getFeatureSupportLevel('CNV')}
/>
}
helperText={<CnvHelperText />}
Expand Down

0 comments on commit ac143fd

Please sign in to comment.