diff --git a/ui/app/components/job-status/panel/steady.js b/ui/app/components/job-status/panel/steady.js index 8b64e348be6c..fbdec940a89f 100644 --- a/ui/app/components/job-status/panel/steady.js +++ b/ui/app/components/job-status/panel/steady.js @@ -121,8 +121,6 @@ export default class JobStatusPanelSteadyComponent extends Component { get totalAllocs() { if (this.args.job.type === 'service' || this.args.job.type === 'batch') { return this.args.job.taskGroups.reduce((sum, tg) => sum + tg.count, 0); - // } else if (this.args.job.type === 'batch') { - // return this.args.job.taskGroups.reduce((sum, tg) => sum + tg.count, 0) - this.completedAllocs.length; } else if (this.atMostOneAllocPerNode) { return this.args.job.allocations.uniqBy('nodeID').length; } else { diff --git a/ui/tests/acceptance/job-status-panel-test.js b/ui/tests/acceptance/job-status-panel-test.js index 36cc1bb22c2b..13dac39cc6d7 100644 --- a/ui/tests/acceptance/job-status-panel-test.js +++ b/ui/tests/acceptance/job-status-panel-test.js @@ -727,7 +727,7 @@ module('Acceptance | job status panel', function (hooks) { groupTaskCount: 10, noActiveDeployment: true, shallow: true, - version: 0, + version: 1, }); let serviceJob = server.create('job', { @@ -745,13 +745,18 @@ module('Acceptance | job status panel', function (hooks) { groupTaskCount: 10, noActiveDeployment: true, shallow: true, - version: 0, + version: 1, }); // Batch job should have 5 running, 3 failed, 2 completed await visit(`/jobs/${batchJob.id}`); assert.dom('.job-status-panel').exists(); - assert.dom('.running-allocs-title').hasText('5/10 Allocations Running'); + assert + .dom('.running-allocs-title') + .hasText( + '5/8 Remaining Allocations Running', + 'Completed allocations do not count toward the Remaining denominator' + ); assert .dom('.ungrouped-allocs .represented-allocation.complete') .exists(