Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsBundle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
GalleryItem,
List,
ListItem,
Split,
SplitItem,
Stack,
StackItem,
Title,
Expand All @@ -19,9 +17,6 @@ import {
Bundle,
PreflightHardwareRequirements,
} from '@openshift-assisted/types/assisted-installer-service';
import NewFeatureSupportLevelBadge, {
NewSupportLevelBadgeProps,
} from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
import { ExternalLink, OperatorsValues, PopoverIcon, singleClusterBundles } from '../../../common';
import { useFormikContext } from 'formik';
import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
Expand All @@ -32,7 +27,6 @@ import { getNewBundleOperators } from '../clusterConfiguration/operators/utils';
import { bundleSpecs } from '../clusterConfiguration/operators/bundleSpecs';
import {
highlightMatch,
OperatorSpec,
useOperatorSpecs,
} from '../../../common/components/operators/operatorSpecs';
import { useClusterWizardContext } from './ClusterWizardContext';
Expand Down Expand Up @@ -78,27 +72,6 @@ const BundleLabel = ({ bundle, searchTerm }: { bundle: Bundle; searchTerm?: stri
);
};

const getBundleSupportLevel = (
bundle: Bundle,
opSpecsByKey: Record<string, OperatorSpec>,
): NewSupportLevelBadgeProps['supportLevel'] => {
let supportLevel: NewSupportLevelBadgeProps['supportLevel'] = undefined;
if (bundle.operators) {
for (const op of bundle.operators) {
const operatorSpec = opSpecsByKey[op];
if (operatorSpec) {
if (operatorSpec.supportLevel === 'dev-preview') {
supportLevel = 'dev-preview';
break;
} else if (operatorSpec.supportLevel === 'tech-preview') {
supportLevel = 'tech-preview';
}
}
}
}
return supportLevel;
};

const BundleCard = ({
bundle,
bundles,
Expand All @@ -116,8 +89,6 @@ const BundleCard = ({
const { byKey: opSpecs } = useOperatorSpecs();
const { uiSettings } = useClusterWizardContext();

const supportLevel = getBundleSupportLevel(bundle, opSpecs);

const hasUnsupportedOperators = !!bundle.operators?.some((op) => {
const operatorSpec = opSpecs[op];
if (!operatorSpec) {
Expand Down Expand Up @@ -190,17 +161,6 @@ const BundleCard = ({
<StackItem isFilled>
<div>{highlightMatch(bundle.description || '', searchTerm)}</div>
</StackItem>
<StackItem>
<Split>
<SplitItem isFilled />
<SplitItem>
<NewFeatureSupportLevelBadge
featureId={bundle.id || ''}
supportLevel={supportLevel}
/>
</SplitItem>
</Split>
</StackItem>
</Stack>
</CardBody>
</Card>
Expand Down
Loading