1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Handle any relaunch errors.

This commit is contained in:
kialam 2018-11-20 11:25:36 -05:00
parent 5f3024d395
commit 435ab4ad67
No known key found for this signature in database
GPG Key ID: 2D0E60E4B8C7EA0F

View File

@ -5,7 +5,7 @@
*************************************************/
export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'WorkflowJobModel', '$interval', 'moment', function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, WorkflowJob, $interval, moment) {
export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'WorkflowJobModel', '$interval', 'moment', 'ComponentsStrings', function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, WorkflowJob, $interval, moment, strings) {
var val = {
getCounts: function(workflowNodes){
var nodeArr = [];
@ -113,6 +113,11 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr
id: scope.workflow.id
}).then((launchRes) => {
$state.go('workflowResults', { id: launchRes.data.id }, { reload: true });
}).catch(({ data, status, config }) => {
ProcessErrors(scope, data, status, null, {
hdr: strings.get('error.HEADER'),
msg: strings.get('error.CALL', { path: `${config.url}`, status })
});
});
},
createOneSecondTimer: function(startTime, fn) {