From dfce76e5114a939b5b00c64600f016a24afb0f36 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Mon, 18 Dec 2023 11:30:20 -0500 Subject: [PATCH] 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. --- .changelog/19505.txt | 3 +++ ui/app/templates/components/allocation-row.hbs | 4 +++- .../components/job-deployment/deployment-allocations.hbs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changelog/19505.txt diff --git a/.changelog/19505.txt b/.changelog/19505.txt new file mode 100644 index 000000000..78b953687 --- /dev/null +++ b/.changelog/19505.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix rendering of allocations table for jobs that don't have actions +``` diff --git a/ui/app/templates/components/allocation-row.hbs b/ui/app/templates/components/allocation-row.hbs index a1d62ebd8..de925249d 100644 --- a/ui/app/templates/components/allocation-row.hbs +++ b/ui/app/templates/components/allocation-row.hbs @@ -137,4 +137,6 @@ @error={{this.statsError}} /> - +{{#if this.model.job.actions.length}} + +{{/if}} diff --git a/ui/app/templates/components/job-deployment/deployment-allocations.hbs b/ui/app/templates/components/job-deployment/deployment-allocations.hbs index 88f1396b9..f21617264 100644 --- a/ui/app/templates/components/job-deployment/deployment-allocations.hbs +++ b/ui/app/templates/components/job-deployment/deployment-allocations.hbs @@ -7,7 +7,7 @@
Allocations
-
+
{{#if @deployment.allocations.length}}