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,
|
selectAwsShareMethod,
|
||||||
selectAwsSourceId,
|
selectAwsSourceId,
|
||||||
selectAzureResourceGroup,
|
selectAzureResourceGroup,
|
||||||
selectAzureShareMethod,
|
|
||||||
selectAzureSource,
|
|
||||||
selectAzureSubscriptionId,
|
selectAzureSubscriptionId,
|
||||||
selectAzureTenantId,
|
selectAzureTenantId,
|
||||||
selectDistribution,
|
selectDistribution,
|
||||||
|
|
@ -263,11 +261,9 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
||||||
const gcpShareMethod = useAppSelector(selectGcpShareMethod);
|
const gcpShareMethod = useAppSelector(selectGcpShareMethod);
|
||||||
const gcpEmail = useAppSelector(selectGcpEmail);
|
const gcpEmail = useAppSelector(selectGcpEmail);
|
||||||
// AZURE
|
// AZURE
|
||||||
const azureShareMethod = useAppSelector(selectAzureShareMethod);
|
|
||||||
const azureTenantId = useAppSelector(selectAzureTenantId);
|
const azureTenantId = useAppSelector(selectAzureTenantId);
|
||||||
const azureSubscriptionId = useAppSelector(selectAzureSubscriptionId);
|
const azureSubscriptionId = useAppSelector(selectAzureSubscriptionId);
|
||||||
const azureResourceGroup = useAppSelector(selectAzureResourceGroup);
|
const azureResourceGroup = useAppSelector(selectAzureResourceGroup);
|
||||||
const azureSource = useAppSelector(selectAzureSource);
|
|
||||||
// Registration
|
// Registration
|
||||||
const registrationValidation = useRegistrationValidation();
|
const registrationValidation = useRegistrationValidation();
|
||||||
// Snapshots
|
// Snapshots
|
||||||
|
|
@ -437,15 +433,9 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
||||||
footer={
|
footer={
|
||||||
<CustomWizardFooter
|
<CustomWizardFooter
|
||||||
disableNext={
|
disableNext={
|
||||||
azureShareMethod === 'manual'
|
!isAzureTenantGUIDValid(azureTenantId) ||
|
||||||
? !isAzureTenantGUIDValid(azureTenantId) ||
|
!isAzureSubscriptionIdValid(azureSubscriptionId) ||
|
||||||
!isAzureSubscriptionIdValid(azureSubscriptionId) ||
|
!isAzureResourceGroupValid(azureResourceGroup)
|
||||||
!isAzureResourceGroupValid(azureResourceGroup)
|
|
||||||
: azureShareMethod === 'sources'
|
|
||||||
? !isAzureTenantGUIDValid(azureTenantId) ||
|
|
||||||
!isAzureSubscriptionIdValid(azureSubscriptionId) ||
|
|
||||||
!isAzureResourceGroupValid(azureResourceGroup)
|
|
||||||
: azureSource === undefined
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ const ImportImageWizard = () => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const addNotification = useAddNotification();
|
const addNotification = useAddNotification();
|
||||||
const locationState = location.state as { blueprint?: wizardState };
|
const locationState = location.state as { blueprint?: wizardState };
|
||||||
const blueprint = locationState?.blueprint;
|
const blueprint = locationState.blueprint;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (blueprint) {
|
if (blueprint) {
|
||||||
dispatch(loadWizardState(blueprint));
|
dispatch(loadWizardState(blueprint));
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ export const isSshKeyValid = (sshKey: string) => {
|
||||||
export const getDuplicateMountPoints = (partitions: Partition[]): string[] => {
|
export const getDuplicateMountPoints = (partitions: Partition[]): string[] => {
|
||||||
const mountPointSet: Set<string> = new Set();
|
const mountPointSet: Set<string> = new Set();
|
||||||
const duplicates: string[] = [];
|
const duplicates: string[] = [];
|
||||||
if (!partitions) {
|
if (partitions.length < 2) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
for (const partition of partitions) {
|
for (const partition of partitions) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue