From 3d761e712bcf7cd13ba1de542931fef7ad417cfa Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 22 Jun 2023 10:22:41 -0400 Subject: [PATCH] ui: remove redundant columns from child job table (#17645) Namespace, job type, and priority are already available from the parent job header, so displaying them in the table caused it to be too crowded. --- .changelog/17645.txt | 3 +++ .../components/job-page/parts/children.hbs | 11 -------- ui/app/templates/components/job-row.hbs | 26 +++++++++++-------- ui/tests/acceptance/job-detail-test.js | 24 ++++++++++++----- ui/tests/pages/jobs/detail.js | 2 ++ 5 files changed, 38 insertions(+), 28 deletions(-) create mode 100644 .changelog/17645.txt diff --git a/.changelog/17645.txt b/.changelog/17645.txt new file mode 100644 index 000000000..d3539109c --- /dev/null +++ b/.changelog/17645.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: remove namespace, type, and priority columns from child job table +``` diff --git a/ui/app/templates/components/job-page/parts/children.hbs b/ui/app/templates/components/job-page/parts/children.hbs index 448632413..08cf53629 100644 --- a/ui/app/templates/components/job-page/parts/children.hbs +++ b/ui/app/templates/components/job-page/parts/children.hbs @@ -46,23 +46,12 @@ Name - {{#if this.system.shouldShowNamespaces}} - - Namespace - - {{/if}} Submitted At Status - - Type - - - Priority - Groups diff --git a/ui/app/templates/components/job-row.hbs b/ui/app/templates/components/job-row.hbs index 779167aae..37d3300da 100644 --- a/ui/app/templates/components/job-row.hbs +++ b/ui/app/templates/components/job-row.hbs @@ -4,7 +4,7 @@ ~}} -{{#if this.system.shouldShowNamespaces}} - - {{this.job.namespace.name}} - +{{#if (not (eq @context "child"))}} + {{#if this.system.shouldShowNamespaces}} + + {{this.job.namespace.name}} + + {{/if}} {{/if}} {{#if (eq @context "child")}} @@ -40,12 +42,14 @@ {{this.job.status}} - - {{this.job.displayType.type}} - - - {{this.job.priority}} - +{{#if (not (eq @context "child"))}} + + {{this.job.displayType.type}} + + + {{this.job.priority}} + +{{/if}} {{#if this.job.taskGroupCount}} {{this.job.taskGroupCount}} diff --git a/ui/tests/acceptance/job-detail-test.js b/ui/tests/acceptance/job-detail-test.js index c58ffb7f1..905888d27 100644 --- a/ui/tests/acceptance/job-detail-test.js +++ b/ui/tests/acceptance/job-detail-test.js @@ -171,6 +171,13 @@ moduleForJob( ) ); }, + "don't display redundant information in children table": async function ( + job, + assert + ) { + assert.notOk(JobDetail.jobsHeader.hasPriority); + assert.notOk(JobDetail.jobsHeader.hasType); + }, } ); @@ -186,9 +193,8 @@ moduleForJob( return parent; }, { - 'display namespace in children table': async function (job, assert) { - assert.ok(JobDetail.jobsHeader.hasNamespace); - assert.equal(JobDetail.jobs[0].namespace, job.namespace); + "don't display namespace in children table": async function (job, assert) { + assert.notOk(JobDetail.jobsHeader.hasNamespace); }, } ); @@ -216,6 +222,13 @@ moduleForJob( ) ); }, + "don't display redundant information in children table": async function ( + job, + assert + ) { + assert.notOk(JobDetail.jobsHeader.hasPriority); + assert.notOk(JobDetail.jobsHeader.hasType); + }, } ); @@ -231,9 +244,8 @@ moduleForJob( return parent; }, { - 'display namespace in children table': async function (job, assert) { - assert.ok(JobDetail.jobsHeader.hasNamespace); - assert.equal(JobDetail.jobs[0].namespace, job.namespace); + "don't display namespace in children table": async function (job, assert) { + assert.notOk(JobDetail.jobsHeader.hasNamespace); }, } ); diff --git a/ui/tests/pages/jobs/detail.js b/ui/tests/pages/jobs/detail.js index 471b37bb6..cdab2e815 100644 --- a/ui/tests/pages/jobs/detail.js +++ b/ui/tests/pages/jobs/detail.js @@ -108,6 +108,8 @@ export default create({ scope: '[data-test-jobs-header]', hasSubmitTime: isPresent('[data-test-jobs-submit-time-header]'), hasNamespace: isPresent('[data-test-jobs-namespace-header]'), + hasType: isPresent('[data-test-jobs-type-header]'), + hasPriority: isPresent('[data-test-jobs-priority-header]'), }, jobs: collection('[data-test-job-row]', {