import React from 'react';
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
import {
Button,
Popover,
Text,
TextContent,
TextVariants,
} from '@patternfly/react-core';
import { ExternalLinkAltIcon, HelpIcon } from '@patternfly/react-icons';
import StepTemplate from './stepTemplate';
const PopoverActivation = () => {
return (
Activation keys allow you to register a system with appropriate
subscriptions and system purpose attached.
}
>
);
};
export default {
StepTemplate,
id: 'wizard-registration',
title: 'Registration',
name: 'registration',
nextStep: 'File system configuration',
fields: [
{
component: componentTypes.RADIO,
label: 'Register images with Red Hat',
name: 'register-system',
initialValue: 'register-now-insights',
options: [
{
label: 'Register and connect image instances with Red Hat',
description: 'Includes Subscriptions and Red Hat Insights',
value: 'register-now-insights',
'data-testid': 'radio-register-now-insights',
autoFocus: true,
},
{
label: 'Register image instances only',
description: 'Includes Subscriptions only',
value: 'register-now',
className: 'pf-u-mt-sm',
'data-testid': 'radio-register-now',
},
{
label: 'Register later',
value: 'register-later',
className: 'pf-u-mt-sm',
'data-testid': 'radio-register-later',
},
],
},
{
component: 'activation-keys',
name: 'subscription-activation-key',
required: true,
label: (
<>
Activation key to use for this image
>
),
condition: {
or: [
{ when: 'register-system', is: 'register-now-insights' },
{ when: 'register-system', is: 'register-now' },
],
},
isRequired: true,
validate: [
{
type: validatorTypes.REQUIRED,
},
],
},
{
component: componentTypes.PLAIN_TEXT,
name: 'subscription-activation-description',
label: (
<>
Create and manage activation keys in the
}
iconPosition="right"
isInline
href="https://access.redhat.com/"
>
Customer Portal
>
),
condition: {
or: [
{ when: 'register-system', is: 'register-now-insights' },
{ when: 'register-system', is: 'register-now' },
],
},
},
{
component: componentTypes.PLAIN_TEXT,
name: 'subscription-register-later',
label: (
Register Later
On initial boot, systems will need to be registered manually before
having access to updates or Red Hat services.
Registering now is recommended.
),
condition: {
or: [{ when: 'register-system', is: 'register-later' }],
},
},
],
};