Wizard: Fix some lint warnings
This resolves lint warnings in `Components/CreateImageWizard`, warnings in `/steps` and `/utilities` sub-directories still need addressing.
This commit is contained in:
parent
676ffc9b3a
commit
c868fe5d41
3 changed files with 5 additions and 15 deletions
|
|
@ -80,8 +80,6 @@ import {
|
|||
selectAwsShareMethod,
|
||||
selectAwsSourceId,
|
||||
selectAzureResourceGroup,
|
||||
selectAzureShareMethod,
|
||||
selectAzureSource,
|
||||
selectAzureSubscriptionId,
|
||||
selectAzureTenantId,
|
||||
selectDistribution,
|
||||
|
|
@ -263,11 +261,9 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
const gcpShareMethod = useAppSelector(selectGcpShareMethod);
|
||||
const gcpEmail = useAppSelector(selectGcpEmail);
|
||||
// AZURE
|
||||
const azureShareMethod = useAppSelector(selectAzureShareMethod);
|
||||
const azureTenantId = useAppSelector(selectAzureTenantId);
|
||||
const azureSubscriptionId = useAppSelector(selectAzureSubscriptionId);
|
||||
const azureResourceGroup = useAppSelector(selectAzureResourceGroup);
|
||||
const azureSource = useAppSelector(selectAzureSource);
|
||||
// Registration
|
||||
const registrationValidation = useRegistrationValidation();
|
||||
// Snapshots
|
||||
|
|
@ -437,15 +433,9 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
footer={
|
||||
<CustomWizardFooter
|
||||
disableNext={
|
||||
azureShareMethod === 'manual'
|
||||
? !isAzureTenantGUIDValid(azureTenantId) ||
|
||||
!isAzureSubscriptionIdValid(azureSubscriptionId) ||
|
||||
!isAzureResourceGroupValid(azureResourceGroup)
|
||||
: azureShareMethod === 'sources'
|
||||
? !isAzureTenantGUIDValid(azureTenantId) ||
|
||||
!isAzureSubscriptionIdValid(azureSubscriptionId) ||
|
||||
!isAzureResourceGroupValid(azureResourceGroup)
|
||||
: azureSource === undefined
|
||||
!isAzureTenantGUIDValid(azureTenantId) ||
|
||||
!isAzureSubscriptionIdValid(azureSubscriptionId) ||
|
||||
!isAzureResourceGroupValid(azureResourceGroup)
|
||||
}
|
||||
/>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const ImportImageWizard = () => {
|
|||
const location = useLocation();
|
||||
const addNotification = useAddNotification();
|
||||
const locationState = location.state as { blueprint?: wizardState };
|
||||
const blueprint = locationState?.blueprint;
|
||||
const blueprint = locationState.blueprint;
|
||||
useEffect(() => {
|
||||
if (blueprint) {
|
||||
dispatch(loadWizardState(blueprint));
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export const isSshKeyValid = (sshKey: string) => {
|
|||
export const getDuplicateMountPoints = (partitions: Partition[]): string[] => {
|
||||
const mountPointSet: Set<string> = new Set();
|
||||
const duplicates: string[] = [];
|
||||
if (!partitions) {
|
||||
if (partitions.length < 2) {
|
||||
return [];
|
||||
}
|
||||
for (const partition of partitions) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue