diff --git a/cracklab/server/web/templates/method_create.html b/cracklab/server/web/templates/method_create.html index 11a5999..91bd433 100644 --- a/cracklab/server/web/templates/method_create.html +++ b/cracklab/server/web/templates/method_create.html @@ -1591,6 +1591,43 @@ } } + function syncBulkWorkloadProfile( + sourceStep, + ) { + if ( + !sourceStep || + sourceStep.dataset.bulkMaskSource !== + "true" + ) { + return; + } + + const groupId = + sourceStep.dataset.bulkMaskGroup; + + if (!groupId) { + return; + } + + const value = + getStepWorkloadProfile( + sourceStep, + ); + + getMethodSteps().forEach( + (step) => { + if ( + step.dataset.bulkMaskGroup === + groupId + ) { + setStepWorkloadProfile( + step, + value, + ); + } + }, + ); + } function getStepDisplayNumber( targetStep, @@ -2389,6 +2426,21 @@ }, ); + const workloadProfile = + step.querySelector( + "[data-workload-profile]", + ); + + if (workloadProfile) { + workloadProfile.addEventListener( + "change", + () => { + syncBulkWorkloadProfile( + step, + ); + }, + ); + } step.querySelector( "[data-remove-step]",