V2Wizard: Gate package recommendations
This gates package recommendations behind an unleash flag and preview. The flag is `image-builder.pkgrecs.enabled`.
This commit is contained in:
parent
6f6784df2d
commit
473d750145
2 changed files with 6 additions and 3 deletions
|
|
@ -57,7 +57,6 @@ const PackageRecommendations = () => {
|
|||
name: data[0].packages[pkg],
|
||||
summary: 'Added from recommended packages',
|
||||
repository: 'distro',
|
||||
isRequiredByOpenScap: false,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
@ -70,7 +69,6 @@ const PackageRecommendations = () => {
|
|||
name: pkg,
|
||||
summary: 'Added from recommended packages',
|
||||
repository: 'distro',
|
||||
isRequiredByOpenScap: false,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
import React from 'react';
|
||||
|
||||
import { Text, Form, Title } from '@patternfly/react-core';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
|
||||
import PackageRecommendations from './PackageRecommendations';
|
||||
import Packages from './Packages';
|
||||
|
||||
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const PackagesStep = () => {
|
||||
const { isBeta } = useGetEnvironment();
|
||||
const packageRecommendationsFlag = useFlag('image-builder.pkgrecs.enabled');
|
||||
return (
|
||||
<Form>
|
||||
<Title headingLevel="h1" size="xl">
|
||||
|
|
@ -13,7 +18,7 @@ const PackagesStep = () => {
|
|||
</Title>
|
||||
<Text>Blueprints created with Images include all required packages.</Text>
|
||||
<Packages />
|
||||
<PackageRecommendations />
|
||||
{isBeta() && packageRecommendationsFlag && <PackageRecommendations />}
|
||||
</Form>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue