Wizard: Gate services on OpenSCAP step behind flag
This gates the visibility of services on the OpenSCAP step behing a flag.
This commit is contained in:
parent
d969646822
commit
87a908af35
2 changed files with 33 additions and 31 deletions
|
|
@ -10,6 +10,7 @@ import {
|
|||
TextListItemVariants,
|
||||
TextListVariants,
|
||||
} from '@patternfly/react-core';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
|
||||
import { RELEASES } from '../../../../constants';
|
||||
import { PolicyRead, usePolicyQuery } from '../../../../store/complianceApi';
|
||||
|
|
@ -37,6 +38,8 @@ export const OscapProfileInformation = ({
|
|||
const compliancePolicyID = useAppSelector(selectCompliancePolicyID);
|
||||
const complianceProfileID = useAppSelector(selectComplianceProfileID);
|
||||
|
||||
const isServicesStepEnabled = useFlag('image-builder.services.enabled');
|
||||
|
||||
const {
|
||||
data: oscapProfileInfo,
|
||||
isFetching: isFetchingOscapProfileInfo,
|
||||
|
|
@ -130,30 +133,36 @@ export const OscapProfileInformation = ({
|
|||
>
|
||||
{oscapProfile?.profile_id}
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dt}
|
||||
className="pf-v5-u-min-width"
|
||||
>
|
||||
Disabled services:
|
||||
</TextListItem>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
<CodeBlock>
|
||||
<CodeBlockCode>
|
||||
{disabledAndMaskedServicesDisplayString}
|
||||
</CodeBlockCode>
|
||||
</CodeBlock>
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dt}
|
||||
className="pf-v5-u-min-width"
|
||||
>
|
||||
Enabled services:
|
||||
</TextListItem>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
<CodeBlock>
|
||||
<CodeBlockCode>{enabledServicesDisplayString}</CodeBlockCode>
|
||||
</CodeBlock>
|
||||
</TextListItem>
|
||||
{!isServicesStepEnabled && (
|
||||
<>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dt}
|
||||
className="pf-v5-u-min-width"
|
||||
>
|
||||
Disabled services:
|
||||
</TextListItem>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
<CodeBlock>
|
||||
<CodeBlockCode>
|
||||
{disabledAndMaskedServicesDisplayString}
|
||||
</CodeBlockCode>
|
||||
</CodeBlock>
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dt}
|
||||
className="pf-v5-u-min-width"
|
||||
>
|
||||
Enabled services:
|
||||
</TextListItem>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
<CodeBlock>
|
||||
<CodeBlockCode>
|
||||
{enabledServicesDisplayString}
|
||||
</CodeBlockCode>
|
||||
</CodeBlock>
|
||||
</TextListItem>
|
||||
</>
|
||||
)}
|
||||
</TextList>
|
||||
</TextContent>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -161,13 +161,6 @@ describe('Step OpenSCAP', () => {
|
|||
await goToOscapStep();
|
||||
await selectProfile();
|
||||
|
||||
await screen.findByText(/disabled services:/i);
|
||||
await screen.findByText(
|
||||
/rpcbind autofs nftables nfs-server emacs-service/i
|
||||
);
|
||||
await screen.findByText(/enabled services:/i);
|
||||
await screen.findByText(/crond/i);
|
||||
|
||||
// check that the FSC contains a /tmp partition
|
||||
await clickNext();
|
||||
await screen.findByRole('heading', { name: /File system configuration/i });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue