diff --git a/public/app/features/provisioning/Wizard/WizardContent.tsx b/public/app/features/provisioning/Wizard/WizardContent.tsx index bb9f654ad23..bb118baa500 100644 --- a/public/app/features/provisioning/Wizard/WizardContent.tsx +++ b/public/app/features/provisioning/Wizard/WizardContent.tsx @@ -121,13 +121,8 @@ export function WizardContent({ setIsSubmitting(false); } } else { - // For job steps, only proceed if the job was successful - if (isJobStep(activeStep)) { - if (stepSuccess) { - handleNext(); - } - } else { - // For other non-submit steps, proceed normally + // only proceed if the job was successful + if (stepSuccess || stepStatus === 'success') { handleNext(); } } @@ -149,21 +144,11 @@ export function WizardContent({ } }, [saveRequest.isSuccess, saveRequest.isError, saveRequest.data, setValue, handleStatusChange]); - // Helper to check if current step needs job status - const isJobStep = (step: string) => { - return step === 'migrate' || step === 'pull'; - }; - - // Determine if the next button should be disabled const isNextButtonDisabled = () => { - if (isSubmitting || isCancelling) { + if (isSubmitting || isCancelling || stepStatus === 'running' || stepStatus === 'error') { return true; } - if (isJobStep(activeStep)) { - return stepStatus === 'running' || stepStatus === 'error'; - } - return false; };