Skip to content

Commit

Permalink
refactor forceCollapsed logic to use hasClientStatus prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaiWithJai committed Oct 6, 2021
1 parent 7ca852b commit 452835d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@jobClientStatus={{this.jobClientStatus}}
/>
{{/if}}
<JobPage::Parts::Summary @job={{this.job}} @forceCollapsed={{this.isSysBatch}} />
<JobPage::Parts::Summary @job={{this.job}} @forceCollapsed={{this.job.hasClientStatus}} />
<JobPage::Parts::PlacementFailures @job={{this.job}} />
<JobPage::Parts::TaskGroups
@job={{this.job}}
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/components/job-page/periodic-child.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@jobClientStatus={{this.jobClientStatus}}
/>
{{/if}}
<JobPage::Parts::Summary @job={{this.job}} @forceCollapsed={{this.isSysBatch}} />
<JobPage::Parts::Summary @job={{this.job}} @forceCollapsed={{this.job.hasClientStatus}} />
<JobPage::Parts::PlacementFailures @job={{this.job}} />
<JobPage::Parts::TaskGroups
@job={{this.job}}
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/unit/utils/job-client-status-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ module('Unit | Util | JobClientStatus', function() {
datacenters: ['dc1'],
status: 'pending',
allocations: [
{ node, clientStatus: 'starting' }, // technically shouldn't be possible but testing the logic
{ node, clientStatus: 'starting' },
{ node, clientStatus: 'starting' },
{ node, clientStatus: 'starting' },
],
Expand Down

0 comments on commit 452835d

Please sign in to comment.