Skip to content

Commit

Permalink
Remove simulacral allocation stat in favor of live-updating one
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Jun 12, 2024
1 parent 7f1665d commit b8880c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/23306.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: unbind job detail running allocations count from job-summary endpoint
```
4 changes: 2 additions & 2 deletions ui/app/components/job-status/panel/steady.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
All allocations have completed successfully
{{else}}
<strong>
{{@job.runningAllocs ~}}
{{this.runningAllocs.length ~}}
{{#unless this.atMostOneAllocPerNode ~}}
{{#if (eq @job.type "batch") ~}}
/{{this.totalNonCompletedAllocs}}
Expand All @@ -42,7 +42,7 @@
{{/unless}}
</strong>
{{#if (eq @job.type "batch") ~}}Remaining{{/if}}
{{pluralize "Allocation" @job.runningAllocs}} Running
{{pluralize "Allocation" this.runningAllocs.length}} Running
{{/if}}
</h3>
<JobStatus::AllocationStatusRow @allocBlocks={{this.allocBlocks}} @steady={{true}} />
Expand Down
4 changes: 4 additions & 0 deletions ui/app/components/job-status/panel/steady.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ export default class JobStatusPanelSteadyComponent extends Component {
return this.job.allocations.filter((a) => !a.isOld && a.hasBeenRestarted);
}

get runningAllocs() {
return this.job.allocations.filter((a) => a.clientStatus === 'running');
}

get completedAllocs() {
return this.job.allocations.filter(
(a) => !a.isOld && a.clientStatus === 'complete'
Expand Down

0 comments on commit b8880c0

Please sign in to comment.