From 7f89eb324ac1c842adaf685fd58dbcacaeccc8f0 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Mon, 14 Dec 2020 11:17:58 -0500 Subject: [PATCH 1/3] Fix key for adhoc command display type --- awx/ui_next/src/components/JobList/JobListItem.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui_next/src/components/JobList/JobListItem.jsx b/awx/ui_next/src/components/JobList/JobListItem.jsx index a813641a7f..be3739ce6e 100644 --- a/awx/ui_next/src/components/JobList/JobListItem.jsx +++ b/awx/ui_next/src/components/JobList/JobListItem.jsx @@ -39,7 +39,7 @@ function JobListItem({ project_update: i18n._(t`Source Control Update`), inventory_update: i18n._(t`Inventory Sync`), job: i18n._(t`Playbook Run`), - command: i18n._(t`Command`), + ad_hoc_command: i18n._(t`Command`), management_job: i18n._(t`Management Job`), workflow_job: i18n._(t`Workflow Job`), }; From 1a4eab6f2579e5c5d94082ad71738f7e92ef7a28 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Mon, 14 Dec 2020 11:19:21 -0500 Subject: [PATCH 2/3] Use type field as key for job display type --- awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx index 4c1dedacee..5d82bcbe23 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx @@ -181,7 +181,7 @@ function JobDetail({ job, i18n }) { } /> )} - + Date: Mon, 14 Dec 2020 11:25:38 -0500 Subject: [PATCH 3/3] Align display types for job list and details --- awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx | 11 ++++++++++- .../src/screens/Job/JobDetail/JobDetail.test.jsx | 2 +- 2 files changed, 11 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 5d82bcbe23..9963fbbba8 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx @@ -92,6 +92,15 @@ function JobDetail({ job, i18n }) { const [errorMsg, setErrorMsg] = useState(); const history = useHistory(); + const jobTypes = { + project_update: i18n._(t`Source Control Update`), + inventory_update: i18n._(t`Inventory Sync`), + job: i18n._(t`Playbook Run`), + ad_hoc_command: i18n._(t`Command`), + management_job: i18n._(t`Management Job`), + workflow_job: i18n._(t`Workflow Job`), + }; + const { value: launchedByValue, link: launchedByLink } = getLaunchedByDetails(job) || {}; @@ -181,7 +190,7 @@ function JobDetail({ job, i18n }) { } /> )} - + ', () => { assertDetail('Started', '8/8/2019, 7:24:18 PM'); assertDetail('Finished', '8/8/2019, 7:24:50 PM'); assertDetail('Job Template', mockJobData.summary_fields.job_template.name); - assertDetail('Job Type', 'Run'); + assertDetail('Job Type', 'Playbook Run'); assertDetail('Launched By', mockJobData.summary_fields.created_by.username); assertDetail('Inventory', mockJobData.summary_fields.inventory.name); assertDetail(