diff --git a/app/templates/patching_iexec.html b/app/templates/patching_iexec.html index a49dd45..6bde898 100644 --- a/app/templates/patching_iexec.html +++ b/app/templates/patching_iexec.html @@ -511,10 +511,18 @@ function toggleDetails(){ const postAttempted = trs.some(tr => tr._postData); const postOk = trs.filter(tr => tr._postData && tr._postData.ok).length; - // Step 1 (check) : toujours dispo. current si pas tenté, done si OK, failed si tenté KO + // Step 1 (check) : actif uniquement si on n'a pas encore lancé une étape ultérieure. + // Dès qu'on est passé à snap/dry/pre/patch/reboot/recon/post, on lock le bouton "Vérifs". + const anyLaterStarted = snapAttempted || dryAttempted || preAttempted + || patchAttempted || rebootAttempted || reconAttempted || postAttempted; const checkState = !checkAttempted ? 'current' : (ckOk > 0 ? 'done' : 'failed'); setBtnState(btnRun, checkState); setStepState('check', checkState); + // Lock explicite si on est passé à la phase suivante + if (btnRun && anyLaterStarted) { + btnRun.disabled = true; + btnRun.title = 'Phase 1 verrouillée — étape suivante déjà démarrée'; + } // Cascade : chaque étape dépend du `done` de la précédente const snapState = deriveState(ckOk, snapAttempted, snapOk);