diff --git a/src/Components/CreateImageWizard/steps/Oscap/components/OpenSCAPFGLabel.tsx b/src/Components/CreateImageWizard/steps/Oscap/components/OpenSCAPFGLabel.tsx deleted file mode 100644 index 8eb37db5..00000000 --- a/src/Components/CreateImageWizard/steps/Oscap/components/OpenSCAPFGLabel.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; - -import { Popover, TextContent, Text, Button } from '@patternfly/react-core'; -import { HelpIcon } from '@patternfly/react-icons'; - -const OpenSCAPFGLabel = () => { - return ( - <> - OpenSCAP profile - - - To run a manual compliance scan in OpenSCAP, download this image. - - - } - > - - - - ); -}; - -export default OpenSCAPFGLabel; diff --git a/src/Components/CreateImageWizard/steps/Oscap/components/OscapProfileInformation.tsx b/src/Components/CreateImageWizard/steps/Oscap/components/OscapProfileInformation.tsx index 686a5ffc..b5d569fb 100644 --- a/src/Components/CreateImageWizard/steps/Oscap/components/OscapProfileInformation.tsx +++ b/src/Components/CreateImageWizard/steps/Oscap/components/OscapProfileInformation.tsx @@ -1,8 +1,6 @@ import React, { useEffect } from 'react'; import { - CodeBlock, - CodeBlockCode, Spinner, TextContent, TextList, @@ -11,7 +9,6 @@ import { TextListVariants, } from '@patternfly/react-core'; -import { RELEASES } from '../../../../../constants'; import { useGetOscapCustomizationsQuery } from '../../../../../store/backendApi'; import { PolicyRead, usePolicyQuery } from '../../../../../store/complianceApi'; import { useAppDispatch, useAppSelector } from '../../../../../store/hooks'; @@ -22,7 +19,6 @@ import { selectComplianceProfileID, selectDistribution, } from '../../../../../store/wizardSlice'; -import { useFlag } from '../../../../../Utilities/useGetEnvironment'; type OscapProfileInformationOptionPropType = { allowChangingCompliancePolicy?: boolean; @@ -36,9 +32,6 @@ export const OscapProfileInformation = ({ const compliancePolicyID = useAppSelector(selectCompliancePolicyID); const complianceProfileID = useAppSelector(selectComplianceProfileID); - const isKernelEnabled = useFlag('image-builder.kernel.enabled'); - const isServicesStepEnabled = useFlag('image-builder.services.enabled'); - const { data: oscapProfileInfo, isFetching: isFetchingOscapProfileInfo, @@ -82,15 +75,6 @@ export const OscapProfileInformation = ({ ); }, [isSuccessPolicyInfo]); - const enabledServicesDisplayString = - oscapProfileInfo?.services?.enabled?.join(' '); - const disabledAndMaskedServices = [ - ...(oscapProfileInfo?.services?.disabled ?? []), - ...(oscapProfileInfo?.services?.masked ?? []), - ]; - const disabledAndMaskedServicesDisplayString = - disabledAndMaskedServices.join(' '); - const oscapProfile = oscapProfileInfo?.openscap as OpenScapProfile; return ( @@ -111,15 +95,6 @@ export const OscapProfileInformation = ({ {oscapProfile?.profile_description} - - Operating system: - - - {RELEASES.get(release)} - {oscapProfile?.profile_id} - {!isKernelEnabled && ( - <> - - Kernel arguments: - - - - - {oscapProfileInfo?.kernel?.append} - - - - - )} - {!isServicesStepEnabled && ( - <> - - Disabled services: - - - - - {disabledAndMaskedServicesDisplayString} - - - - - Enabled services: - - - - - {enabledServicesDisplayString} - - - - - )} + + + + )} + {isSuccessPolicyInfo && ( + <> + + + + Policy description: + + + {policyInfo?.data?.schema?.description} + + + Business objective: + + + {policyInfo?.data?.schema?.business_objective} + + + Policy type: + + + {policyInfo?.data?.schema?.type} + + + Reference ID: + + + {policyInfo?.data?.schema?.id} + diff --git a/src/Components/CreateImageWizard/steps/Oscap/components/ProfileSelector.tsx b/src/Components/CreateImageWizard/steps/Oscap/components/ProfileSelector.tsx index be0cd8f1..50d589cb 100644 --- a/src/Components/CreateImageWizard/steps/Oscap/components/ProfileSelector.tsx +++ b/src/Components/CreateImageWizard/steps/Oscap/components/ProfileSelector.tsx @@ -17,8 +17,6 @@ import { import { TimesIcon } from '@patternfly/react-icons'; import { v4 as uuidv4 } from 'uuid'; -import OpenSCAPFGLabel from './OpenSCAPFGLabel'; - import { useGetOscapProfilesQuery, useGetOscapCustomizationsQuery, @@ -323,6 +321,11 @@ const ProfileSelector = () => { onClick={() => setIsOpen(!isOpen)} isExpanded={isOpen} isDisabled={!isSuccess || hasWslTargetOnly} + style={ + { + width: '100%', + } as React.CSSProperties + } > { ); return ( - }> +