debian-image-builder-frontend/src/Components/CreateImageWizard/steps/Registration/index.tsx
Gianluca Zuccarelli 29b7e02de2 CreateImageWizard: hide activation keys for on-prem
Subject says it all
2025-01-27 17:03:06 +01:00

44 lines
1.3 KiB
TypeScript

import React from 'react';
import { Text, Form, Title, FormGroup } from '@patternfly/react-core';
import ActivationKeyInformation from './ActivationKeyInformation';
import ActivationKeysList from './ActivationKeysList';
import Registration from './Registration';
import { useAppSelector } from '../../../../store/hooks';
import {
selectActivationKey,
selectRegistrationType,
} from '../../../../store/wizardSlice';
const RegistrationStep = () => {
const activationKey = useAppSelector(selectActivationKey);
const registrationType = useAppSelector(selectRegistrationType);
return (
<Form>
<Title headingLevel="h1" size="xl">
Register systems using this image
</Title>
<Text>
You can either automatically register your systems with Red Hat to
enhance security and track your spending or choose to register your
system during initial boot.
</Text>
<Registration />
{!process.env.IS_ON_PREMISE && <ActivationKeysList />}
{!process.env.IS_ON_PREMISE &&
activationKey &&
registrationType !== 'register-later' && (
<FormGroup
label={'Selected activation key'}
data-testid="selected-activation-key"
>
<ActivationKeyInformation />
</FormGroup>
)}
</Form>
);
};
export default RegistrationStep;