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

Merge pull request #2762 from kialam/fix-2554-converted-jts-from-sjt

UI WF results relaunch: handle any relaunch errors.

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2018-11-21 15:01:17 +00:00 committed by GitHub
commit bb1473f67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

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) {

View File

@ -18,7 +18,7 @@ describe('Controller: workflowResults', () => {
beforeEach(angular.mock.module('workflowResults', ($provide) => {
['PromptDialog', 'Prompt', 'Wait', 'Rest', '$state', 'ProcessErrors',
'jobLabels', 'workflowNodes', 'count', 'WorkflowJobModel',
'jobLabels', 'workflowNodes', 'count', 'WorkflowJobModel', 'ComponentsStrings'
].forEach((item) => {
$provide.value(item, {});
});

View File

@ -6,7 +6,7 @@ describe('workflowResultsService', () => {
let $interval;
beforeEach(angular.mock.module('workflowResults', ($provide) => {
['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel']
['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel', 'ComponentsStrings']
.forEach(function(item) {
$provide.value(item, {});
});