Wizard: make Satellite CA cert optional
Users do not need to fill in the satellite certificate, omitting parts of code that require it.
This commit is contained in:
parent
2ee812efe0
commit
4c82ae8749
2 changed files with 2 additions and 12 deletions
|
|
@ -50,7 +50,7 @@ const SatelliteRegistration = () => {
|
|||
return (
|
||||
<>
|
||||
<SatelliteRegistrationCommand />
|
||||
<FormGroup label="Certificate authority (CA) for Satellite" isRequired>
|
||||
<FormGroup label="Certificate authority (CA) for Satellite">
|
||||
<FileUpload
|
||||
id="text-file-with-restrictions-example"
|
||||
type="text"
|
||||
|
|
@ -59,7 +59,6 @@ const SatelliteRegistration = () => {
|
|||
onDataChange={handleDataChange}
|
||||
onTextChange={handleTextChange}
|
||||
onClearClick={handleClear}
|
||||
isRequired={true}
|
||||
dropzoneProps={{
|
||||
accept: {
|
||||
'application/x-pem-file': ['.pem'],
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import {
|
|||
selectLanguages,
|
||||
selectKeyboard,
|
||||
selectTimezone,
|
||||
selectSatelliteCaCertificate,
|
||||
selectSatelliteRegistrationCommand,
|
||||
selectImageTypes,
|
||||
UserWithAdditionalInfo,
|
||||
|
|
@ -177,7 +176,6 @@ export function useRegistrationValidation(): StepValidation {
|
|||
const registrationCommand = useAppSelector(
|
||||
selectSatelliteRegistrationCommand
|
||||
);
|
||||
const caCertificate = useAppSelector(selectSatelliteCaCertificate);
|
||||
|
||||
const { isFetching: isFetchingKeyInfo, isError: isErrorKeyInfo } =
|
||||
useShowActivationKeyQuery(
|
||||
|
|
@ -212,20 +210,13 @@ export function useRegistrationValidation(): StepValidation {
|
|||
|
||||
if (registrationType === 'register-satellite') {
|
||||
const errors = {};
|
||||
if (caCertificate === '') {
|
||||
Object.assign(errors, {
|
||||
certificate:
|
||||
'Valid certificate must be present if you are registering Satellite.',
|
||||
});
|
||||
}
|
||||
const tokenErrors = validateSatelliteToken(registrationCommand);
|
||||
Object.assign(errors, tokenErrors);
|
||||
|
||||
return {
|
||||
errors: errors,
|
||||
disabledNext:
|
||||
Object.keys(errors).some((key) => key !== 'expired') ||
|
||||
!caCertificate ||
|
||||
Object.keys(errors).some((key) => key !== 'expired') ||
|
||||
!registrationCommand,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue