diff --git a/ui/app/controllers/jobs/job/task-group.js b/ui/app/controllers/jobs/job/task-group.js index a20fdc52f..cb6915be0 100644 --- a/ui/app/controllers/jobs/job/task-group.js +++ b/ui/app/controllers/jobs/job/task-group.js @@ -54,4 +54,9 @@ export default class TaskGroupController extends Controller.extend( gotoAllocation(allocation) { this.transitionToRoute('allocations.allocation', allocation); } + + @action + scaleTaskGroup(count) { + return this.model.scale(count); + } } diff --git a/ui/app/templates/jobs/job/task-group.hbs b/ui/app/templates/jobs/job/task-group.hbs index 8cd257711..7910b1059 100644 --- a/ui/app/templates/jobs/job/task-group.hbs +++ b/ui/app/templates/jobs/job/task-group.hbs @@ -15,7 +15,8 @@ @max={{model.scaling.max}} @value={{model.count}} @class="is-primary is-small" - @disabled={{or model.job.runningDeployment (cannot "scale job")}}> + @disabled={{or model.job.runningDeployment (cannot "scale job")}} + @onChange={{action "scaleTaskGroup"}}> Count {{/if}}