From eb901b59b0ffc501d968b3f0eebb7014dac05f82 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 18 Jun 2020 22:50:47 -0700 Subject: [PATCH] Wire up the scale action on the task group page --- ui/app/controllers/jobs/job/task-group.js | 5 +++++ ui/app/templates/jobs/job/task-group.hbs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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}}