From 5ba6d14e4d4d354fa78d44fe1065757c6ce33e70 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 10 Feb 2021 13:42:27 -0500 Subject: [PATCH] Show job and skip tags on job detail view --- .../src/screens/Job/JobDetail/JobDetail.jsx | 36 +++++++++++++++++++ .../screens/Job/JobDetail/JobDetail.test.jsx | 12 +++++++ .../src/screens/Job/shared/data.job.json | 4 +-- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx index 9ee8e2a94e..d41632008b 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx @@ -281,6 +281,42 @@ function JobDetail({ job, i18n }) { } /> )} + {job.job_tags && job.job_tags.length > 0 && ( + + {job.job_tags.split(',').map(jobTag => ( + + {jobTag} + + ))} + + } + /> + )} + {job.skip_tags && job.skip_tags.length > 0 && ( + + {job.skip_tags.split(',').map(skipTag => ( + + {skipTag} + + ))} + + } + /> + )} ', () => { mockJobData.summary_fields.credentials[0] ); + expect( + wrapper + .find('Detail[label="Job Tags"]') + .containsAnyMatchingElements([a, b]) + ).toEqual(true); + + expect( + wrapper + .find('Detail[label="Skip Tags"]') + .containsAnyMatchingElements([c, d]) + ).toEqual(true); + const statusDetail = wrapper.find('Detail[label="Status"]'); expect(statusDetail.find('StatusIcon SuccessfulTop')).toHaveLength(1); expect(statusDetail.find('StatusIcon SuccessfulBottom')).toHaveLength(1); diff --git a/awx/ui_next/src/screens/Job/shared/data.job.json b/awx/ui_next/src/screens/Job/shared/data.job.json index 98d071c876..778c2fcc84 100644 --- a/awx/ui_next/src/screens/Job/shared/data.job.json +++ b/awx/ui_next/src/screens/Job/shared/data.job.json @@ -101,9 +101,9 @@ "limit": "", "verbosity": 0, "extra_vars": "{\"num_messages\": 94}", - "job_tags": "", + "job_tags": "a,b", "force_handlers": false, - "skip_tags": "", + "skip_tags": "c,d", "start_at_task": "", "timeout": 0, "use_fact_cache": false,