mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 16:58:46 -03:30
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:
@@ -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 = {
|
var val = {
|
||||||
getCounts: function(workflowNodes){
|
getCounts: function(workflowNodes){
|
||||||
var nodeArr = [];
|
var nodeArr = [];
|
||||||
@@ -113,6 +113,11 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr
|
|||||||
id: scope.workflow.id
|
id: scope.workflow.id
|
||||||
}).then((launchRes) => {
|
}).then((launchRes) => {
|
||||||
$state.go('workflowResults', { id: launchRes.data.id }, { reload: true });
|
$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) {
|
createOneSecondTimer: function(startTime, fn) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ describe('Controller: workflowResults', () => {
|
|||||||
|
|
||||||
beforeEach(angular.mock.module('workflowResults', ($provide) => {
|
beforeEach(angular.mock.module('workflowResults', ($provide) => {
|
||||||
['PromptDialog', 'Prompt', 'Wait', 'Rest', '$state', 'ProcessErrors',
|
['PromptDialog', 'Prompt', 'Wait', 'Rest', '$state', 'ProcessErrors',
|
||||||
'jobLabels', 'workflowNodes', 'count', 'WorkflowJobModel',
|
'jobLabels', 'workflowNodes', 'count', 'WorkflowJobModel', 'ComponentsStrings'
|
||||||
].forEach((item) => {
|
].forEach((item) => {
|
||||||
$provide.value(item, {});
|
$provide.value(item, {});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ describe('workflowResultsService', () => {
|
|||||||
let $interval;
|
let $interval;
|
||||||
|
|
||||||
beforeEach(angular.mock.module('workflowResults', ($provide) => {
|
beforeEach(angular.mock.module('workflowResults', ($provide) => {
|
||||||
['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel']
|
['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel', 'ComponentsStrings']
|
||||||
.forEach(function(item) {
|
.forEach(function(item) {
|
||||||
$provide.value(item, {});
|
$provide.value(item, {});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user