From f97ffefe93cfc1ee89bc054f312c1cf63e25dbbf Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Mon, 20 Feb 2017 15:34:21 -0500 Subject: [PATCH 1/4] include workflows on dashboard recent job runs list --- awx/ui/client/src/controllers/Home.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/controllers/Home.js b/awx/ui/client/src/controllers/Home.js index 3c81e7a798..f7fdd12cec 100644 --- a/awx/ui/client/src/controllers/Home.js +++ b/awx/ui/client/src/controllers/Home.js @@ -38,7 +38,7 @@ export function Home($scope, $compile, $stateParams, $rootScope, $location, $log ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard host graph data: ' + status }); }); - Rest.setUrl(GetBasePath("jobs") + "?order_by=-finished&page_size=5&finished__isnull=false"); + Rest.setUrl("api/v1/unified_jobs?order_by=-finished&page_size=5&finished__isnull=false&type=workflow_job,job"); Rest.get() .success(function (data) { $scope.dashboardJobsListData = data.results; @@ -114,7 +114,7 @@ export function Home($scope, $compile, $stateParams, $rootScope, $location, $log .error(function (data, status) { ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard: ' + status }); }); - Rest.setUrl(GetBasePath("jobs") + "?order_by=-finished&page_size=5&finished__isnull=false"); + Rest.setUrl("api/v1/unified_jobs?order_by=-finished&page_size=5&finished__isnull=false&type=workflow_job,job"); Rest.get() .success(function (data) { data = data.results; From ad6d7acf4d53b6b81e4aba9c622a41ade6475b4e Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Mon, 20 Feb 2017 15:51:30 -0500 Subject: [PATCH 2/4] update failed icon for rhs dashboard recent job run list --- .../src/dashboard/lists/dashboard-list.block.less | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/awx/ui/client/src/dashboard/lists/dashboard-list.block.less b/awx/ui/client/src/dashboard/lists/dashboard-list.block.less index 0903b01c74..16b5262e46 100644 --- a/awx/ui/client/src/dashboard/lists/dashboard-list.block.less +++ b/awx/ui/client/src/dashboard/lists/dashboard-list.block.less @@ -86,6 +86,18 @@ color: @default-err; } +.DashboardList-status--failed{ + color: @default-err; + margin-top: 10px; + margin-bottom: 10px; + padding: 0px; + margin-right: 5px; +} + +.DashboardList-status--failed:before { + content: "\f06a"; +} + .DashboardList-nameCell { padding-left: 15px; width: 100%; From 293063d31541562d5dbd4d307fe1818d3b02a44b Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Wed, 22 Feb 2017 10:42:39 -0500 Subject: [PATCH 3/4] Pass template type to remaining aw-smart-status directives. The directive will look at the type when generating the href --- .../lists/job-templates/job-templates-list.partial.html | 2 +- .../src/partials/organizations-job-template-smart-status.html | 2 +- awx/ui/client/src/partials/scan-job-template-smart-status.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/dashboard/lists/job-templates/job-templates-list.partial.html b/awx/ui/client/src/dashboard/lists/job-templates/job-templates-list.partial.html index 846b268c29..20817d40e6 100644 --- a/awx/ui/client/src/dashboard/lists/job-templates/job-templates-list.partial.html +++ b/awx/ui/client/src/dashboard/lists/job-templates/job-templates-list.partial.html @@ -30,7 +30,7 @@ - +
diff --git a/awx/ui/client/src/partials/organizations-job-template-smart-status.html b/awx/ui/client/src/partials/organizations-job-template-smart-status.html index 1c45c5fe36..d4f8d860b3 100644 --- a/awx/ui/client/src/partials/organizations-job-template-smart-status.html +++ b/awx/ui/client/src/partials/organizations-job-template-smart-status.html @@ -1 +1 @@ - + diff --git a/awx/ui/client/src/partials/scan-job-template-smart-status.html b/awx/ui/client/src/partials/scan-job-template-smart-status.html index cb5787fed1..67d1ef287e 100644 --- a/awx/ui/client/src/partials/scan-job-template-smart-status.html +++ b/awx/ui/client/src/partials/scan-job-template-smart-status.html @@ -1 +1 @@ - + From de4aeb064cf806c9e31c868fb4260117dde5ab3e Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Wed, 22 Feb 2017 10:48:53 -0500 Subject: [PATCH 4/4] Fixed recent job runs workflows link --- awx/ui/client/src/dashboard/lists/jobs/jobs-list.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/dashboard/lists/jobs/jobs-list.directive.js b/awx/ui/client/src/dashboard/lists/jobs/jobs-list.directive.js index 4658b45574..dd9b1b578f 100644 --- a/awx/ui/client/src/dashboard/lists/jobs/jobs-list.directive.js +++ b/awx/ui/client/src/dashboard/lists/jobs/jobs-list.directive.js @@ -29,7 +29,7 @@ export default // detailsUrl, status, name, time scope.jobs = _.map(list, function(job){ return { - detailsUrl: job.url.replace("api/v1", "#"), + detailsUrl: job.type && job.type === 'workflow_job' ? job.url.replace("api/v1/workflow_jobs", "#/workflows") : job.url.replace("api/v1", "#"), status: job.status, name: job.name, id: job.id,