Skip to content

Commit

Permalink
Merge pull request #4518 from hashicorp/f-ui-deployment-deadline-ever…
Browse files Browse the repository at this point in the history
…ywhere

UI: Show deployment deadlines everywhere
  • Loading branch information
DingoEatingFuzz committed Jul 26, 2018
2 parents e927fa3 + 0daeb09 commit b07c648
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
12 changes: 4 additions & 8 deletions ui/app/templates/components/job-deployment/task-groups.hbs
Expand Up @@ -14,9 +14,7 @@
<th>Allocs</th>
<th>Healthy Allocs</th>
<th>Unhealthy Allocs</th>
{{#if inProgress}}
<th>Progress Deadline</th>
{{/if}}
<th>Progress Deadline</th>
{{/t.head}}
{{#t.body as |row|}}
<tr data-test-deployment-task-group>
Expand All @@ -33,11 +31,9 @@
<td data-test-deployment-task-group-allocs>{{row.model.placedAllocs}} / {{row.model.desiredTotal}}</td>
<td data-test-deployment-task-group-healthy>{{row.model.healthyAllocs}}</td>
<td data-test-deployment-task-group-unhealthy>{{row.model.unhealthyAllocs}}</td>
{{#if inProgress}}
<td data-test-deployment-task-group-progress-deadline>
<span class="nowrap">{{moment-format row.model.requireProgressBy "MM/DD/YY HH:mm:ss"}}</span>
</td>
{{/if}}
<td data-test-deployment-task-group-progress-deadline>
<span class="nowrap">{{moment-format row.model.requireProgressBy "MM/DD/YY HH:mm:ss"}}</span>
</td>
</tr>
{{/t.body}}
{{/list-table}}
Expand Down
Expand Up @@ -19,7 +19,7 @@
{{#job-deployment-details deployment=job.runningDeployment as |d|}}
{{d.metrics}}
{{#if isShowingDeploymentDetails}}
{{d.taskGroups inProgress=true}}
{{d.taskGroups}}
{{d.allocations}}
{{/if}}
{{/job-deployment-details}}
Expand Down
5 changes: 5 additions & 0 deletions ui/tests/acceptance/job-deployments-test.js
Expand Up @@ -202,6 +202,11 @@ test('when open, a deployment shows a list of all task groups and their respecti
);
assert.equal(taskGroupRow.healthy, taskGroup.healthyAllocs, 'Healthy Allocs');
assert.equal(taskGroupRow.unhealthy, taskGroup.unhealthyAllocs, 'Unhealthy Allocs');
assert.equal(
taskGroupRow.progress,
moment(taskGroup.requireProgressBy).format('MM/DD/YY HH:mm:ss'),
'Progress By'
);
});
});
});
Expand Down
1 change: 1 addition & 0 deletions ui/tests/pages/jobs/job/deployments.js
Expand Up @@ -43,6 +43,7 @@ export default create({
allocs: text('[data-test-deployment-task-group-allocs]'),
healthy: text('[data-test-deployment-task-group-healthy]'),
unhealthy: text('[data-test-deployment-task-group-unhealthy]'),
progress: text('[data-test-deployment-task-group-progress-deadline]'),
}),

hasAllocations: isPresent('[data-test-deployment-allocations]'),
Expand Down

0 comments on commit b07c648

Please sign in to comment.