AC-987 job launch shows working 2x

This commit is contained in:
Chris Houseknecht
2014-01-28 17:22:34 -05:00
parent 7434bb8a9e
commit 0e6305c9ec
2 changed files with 2 additions and 7 deletions

View File

@@ -94,7 +94,7 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
else { else {
// many hosts with 0 failures // many hosts with 0 failures
scope.inventories[i].failed_hosts_tip = scope.inventories[i].total_hosts + scope.inventories[i].failed_hosts_tip = scope.inventories[i].total_hosts +
( (scope.inventories[i].total_hosts > 1) ? ' hosts' : ' host' ) + " with no failures. Click to view details."; ( (scope.inventories[i].total_hosts > 1) ? ' hosts' : ' host' ) + " with no job failures. Click to view details.";
scope.inventories[i].failed_hosts_link = '/#/inventories/' + scope.inventories[i].id + '/'; scope.inventories[i].failed_hosts_link = '/#/inventories/' + scope.inventories[i].id + '/';
scope.inventories[i].failed_hosts_class = 'false'; scope.inventories[i].failed_hosts_class = 'false';
} }

View File

@@ -230,7 +230,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
extra_vars: data.extra_vars extra_vars: data.extra_vars
}) })
.success( function(data, status, headers, config) { .success( function(data, status, headers, config) {
Wait('stop');
scope.job_id = data.id; scope.job_id = data.id;
if (data.passwords_needed_to_start.length > 0) { if (data.passwords_needed_to_start.length > 0) {
// Passwords needed. Prompt for passwords, then start job. // Passwords needed. Prompt for passwords, then start job.
@@ -243,7 +242,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
} }
else { else {
// No passwords needed, start the job! // No passwords needed, start the job!
Wait('start');
Rest.setUrl(data.related.start); Rest.setUrl(data.related.start);
Rest.post() Rest.post()
.success( function(data, status, headers, config) { .success( function(data, status, headers, config) {
@@ -257,7 +255,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
} }
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
ProcessErrors(scope, data, status, null, ProcessErrors(scope, data, status, null,
{ hdr: 'Error!', msg: 'Failed to start job. POST returned status: ' + status }); { hdr: 'Error!', msg: 'Failed to start job. POST returned status: ' + status });
}); });
@@ -275,11 +272,11 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
Rest.setUrl(url); Rest.setUrl(url);
Rest.get() Rest.get()
.success( function(data, status, headers, config) { .success( function(data, status, headers, config) {
Wait('stop');
// Create a job record // Create a job record
scope.credential = ''; scope.credential = '';
if (data.credential == '' || data.credential == null) { if (data.credential == '' || data.credential == null) {
// Template does not have credential, prompt for one // Template does not have credential, prompt for one
Wait('stop');
if (scope.credentialWatchRemove) { if (scope.credentialWatchRemove) {
scope.credentialWatchRemove(); scope.credentialWatchRemove();
} }
@@ -309,7 +306,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
} }
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
ProcessErrors(scope, data, status, null, ProcessErrors(scope, data, status, null,
{ hdr: 'Error!', msg: 'Failed to get job template details. GET returned status: ' + status }); { hdr: 'Error!', msg: 'Failed to get job template details. GET returned status: ' + status });
}); });
@@ -394,7 +390,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
} }
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
ProcessErrors(scope, data, status, null, ProcessErrors(scope, data, status, null,
{ hdr: 'Error!', msg: 'Failed to get project update details: ' + url + ' GET status: ' + status }); { hdr: 'Error!', msg: 'Failed to get project update details: ' + url + ' GET status: ' + status });
}); });