ui: fix AllocationRow for job without action (#19505)

The allocation table header sometimes conditionally renders the
`Actions` table column, but the allocation row would render it
unconditionally, resulting in broken tables when rendering allocations
for jobs without actions, where rows had more columns than the header.

Also fix the conditional class for the deployments allocation table to
read `length` from the right value.
This commit is contained in:
Luiz Aoqui
2023-12-18 11:30:20 -05:00
committed by GitHub
parent 7a87049eab
commit dfce76e511
3 changed files with 7 additions and 2 deletions

3
.changelog/19505.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
ui: Fix rendering of allocations table for jobs that don't have actions
```

View File

@@ -137,4 +137,6 @@
@error={{this.statsError}}
/>
</td>
<td class="job-actions-cell" />
{{#if this.model.job.actions.length}}
<td class="job-actions-cell" />
{{/if}}

View File

@@ -7,7 +7,7 @@
<div class="boxed-section-head">
Allocations
</div>
<div class="boxed-section-body {{if this.job.allocations.length "is-full-bleed"}}">
<div class="boxed-section-body {{if @deployment.allocations.length "is-full-bleed"}}">
{{#if @deployment.allocations.length}}
<ListTable @source={{@deployment.allocations}} @class="allocations" as |t|>
<t.head>