Merge pull request #2455 from kialam/fix/2193-workflow-status

Account for canceled workflow status in chart and results section
This commit is contained in:
kialam
2018-07-09 16:58:44 -04:00
committed by GitHub
3 changed files with 9 additions and 3 deletions

View File

@@ -86,7 +86,7 @@
.workflowChart-nodeStatus--success { .workflowChart-nodeStatus--success {
fill: @default-succ; fill: @default-succ;
} }
.workflowChart-nodeStatus--failed { .workflowChart-nodeStatus--failed, .workflowChart-nodeStatus--canceled {
fill: @default-err; fill: @default-err;
} }
.WorkflowChart-detailsLink { .WorkflowChart-detailsLink {

View File

@@ -535,6 +535,9 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge
case "error": case "error":
statusClass += "workflowChart-nodeStatus--failed"; statusClass += "workflowChart-nodeStatus--failed";
break; break;
case "canceled":
statusClass += "workflowChart-nodeStatus--canceled";
break;
} }
} }
@@ -785,6 +788,9 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge
case "error": case "error":
statusClass += "workflowChart-nodeStatus--failed"; statusClass += "workflowChart-nodeStatus--failed";
break; break;
case "canceled":
statusClass += "workflowChart-nodeStatus--canceled";
break;
} }
} }

View File

@@ -221,7 +221,7 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions',
runTimeElapsedTimer = workflowResultsService.createOneSecondTimer(moment(), updateWorkflowJobElapsedTimer); runTimeElapsedTimer = workflowResultsService.createOneSecondTimer(moment(), updateWorkflowJobElapsedTimer);
} }
if(data.status === "successful" || data.status === "failed" || data.status === "error"){ if(data.status === "successful" || data.status === "failed" || data.status === "canceled" || data.status === "error"){
$state.go('.', null, { reload: true }); $state.go('.', null, { reload: true });
} }
} }
@@ -234,7 +234,7 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions',
// can happen if the GET request on the workflow job returns "waiting" and // can happen if the GET request on the workflow job returns "waiting" and
// the sockets aren't established yet so we miss the event that indicates // the sockets aren't established yet so we miss the event that indicates
// the workflow job has moved into a running state. // the workflow job has moved into a running state.
if (!_.includes(['running', 'successful', 'failed', 'error'], $scope.workflow.status)){ if (!_.includes(['running', 'successful', 'failed', 'error', 'canceled'], $scope.workflow.status)){
$scope.workflow.status = 'running'; $scope.workflow.status = 'running';
runTimeElapsedTimer = workflowResultsService.createOneSecondTimer(moment(), updateWorkflowJobElapsedTimer); runTimeElapsedTimer = workflowResultsService.createOneSecondTimer(moment(), updateWorkflowJobElapsedTimer);
} }