From fef625445f0e6a0f81ff5958b2d027d0de0e7313 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Fri, 13 Sep 2013 00:01:58 -0400 Subject: [PATCH] User related.current_update for SCM project status detail when availble (i.e. while an update is running). Otherwise use related.last_update. --- awx/ui/static/js/controllers/Projects.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index edbac5062b..b229ff49f6 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -82,13 +82,16 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, } } if (project.scm_type !== null) { - if (project.related.last_update !== undefined && project.status !== 'updating') { + if (project.related.current_update) { + ProjectStatus({ project_id: id, last_update: project.related.current_update }); + } + else if (project.related.last_update) { ProjectStatus({ project_id: id, last_update: project.related.last_update }); } - else if (project.status == 'updating') { - Alert('Pending Status', 'An update is currently running. Status details cannot be viewed until the update process ' + - ' completes. Use the refresh button to monitor progress of the update process.', 'alert-info'); - } + // else if (project.status == 'updating') { + // Alert('Pending Status', 'An update is currently running. Status details cannot be viewed until the update process ' + + // ' completes. Use the refresh button to monitor progress of the update process.', 'alert-info'); + // } else { Alert('No Updates Available', 'There is no SCM update information available for this project. An update has not yet been ' + ' completed. If you have not already done so, start an update for this project.', 'alert-info');