Skip to content

Commit

Permalink
Merge pull request #8714 from hashicorp/f-ui/always-show-scale-event-…
Browse files Browse the repository at this point in the history
…accordion

UI: Always show the scaling events accordion
  • Loading branch information
DingoEatingFuzz authored Aug 24, 2020
2 parents 7e3362c + 3c8a7d3 commit adb0610
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions ui/app/templates/jobs/job/task-group.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,16 @@
<ScaleEventsChart @events={{this.sortedScaleEvents}} />
</div>
</div>
{{else}}
<div data-test-scaling-events class="boxed-section">
<div class="boxed-section-head">
Recent Scaling Events
</div>
<div class="boxed-section-body">
<ScaleEventsAccordion @events={{this.sortedScaleEvents}} />
</div>
</div>
{{/if}}

<div data-test-scaling-events class="boxed-section">
<div class="boxed-section-head">
Recent Scaling Events
</div>
<div class="boxed-section-body">
<ScaleEventsAccordion @events={{this.sortedScaleEvents}} />
</div>
</div>
{{/if}}

{{#if this.model.volumes.length}}
Expand Down
4 changes: 2 additions & 2 deletions ui/tests/acceptance/task-group-detail-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ module('Acceptance | task group detail', function(hooks) {
});
});

test('when a task group has at least two count scaling events and the count scaling events outnumber the non-count scaling events, a timeline is shown instead of an accordion', async function(assert) {
test('when a task group has at least two count scaling events and the count scaling events outnumber the non-count scaling events, a timeline is shown in addition to the accordion', async function(assert) {
const taskGroupScale = job.jobScale.taskGroupScales.models.find(m => m.name === taskGroup.name);
taskGroupScale.update({
events: [
Expand All @@ -473,7 +473,7 @@ module('Acceptance | task group detail', function(hooks) {
const scaleEvents = taskGroupScale.events.models.sortBy('time').reverse();
await TaskGroup.visit({ id: job.id, name: taskGroup.name });

assert.notOk(TaskGroup.hasScaleEvents);
assert.ok(TaskGroup.hasScaleEvents);
assert.ok(TaskGroup.hasScalingTimeline);

assert.equal(
Expand Down

0 comments on commit adb0610

Please sign in to comment.