Agent - Last step quit with success (#6034)

* turn strings to enums and allow changing step completion action

* fixed edit

* added tests for agent enums and fixed cms tests
This commit is contained in:
Aditya Bist
2019-06-20 00:30:05 -07:00
committed by GitHub
parent 433e5633cf
commit 1ececc3035
11 changed files with 273 additions and 60 deletions

View File

@@ -659,9 +659,9 @@ export class JobDialog extends AgentDialog<JobData> {
let cols = [];
cols.push(jobStep.id);
cols.push(jobStep.stepName);
cols.push(jobStep.subSystem);
cols.push(jobStep.successAction);
cols.push(jobStep.failureAction);
cols.push(JobStepData.convertToSubSystemDisplayName(jobStep.subSystem));
cols.push(JobStepData.convertToCompletionActionDisplayName(jobStep.successAction));
cols.push(JobStepData.convertToCompletionActionDisplayName(jobStep.failureAction));
result.push(cols);
});
return result;
@@ -708,6 +708,11 @@ export class JobDialog extends AgentDialog<JobData> {
this.model.jobSteps = [];
}
this.model.jobSteps = this.steps;
// Change the last step's success action to quit because the
// default is "Go To Next Step"
if (this.model.jobSteps.length > 0) {
this.model.jobSteps[this.model.jobSteps.length - 1].successAction = azdata.StepCompletionAction.QuitWithSuccess;
}
if (!this.model.jobSchedules) {
this.model.jobSchedules = [];
}