chagned strings to enums and can edit step completion actions (#827)

This commit is contained in:
Aditya Bist
2019-06-20 00:30:37 -07:00
committed by GitHub
parent 347d233e95
commit fc50913f14
5 changed files with 26 additions and 26 deletions

View File

@@ -72,10 +72,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
stepInfo.JobId = jobId;
stepInfo.JobName = logEntry.JobName;
stepInfo.StepName = step.Name;
stepInfo.SubSystem = step.SubSystem.ToString();
stepInfo.SubSystem = step.SubSystem;
stepInfo.Id = step.ID;
stepInfo.FailureAction = step.OnFailAction.ToString();
stepInfo.SuccessAction = step.OnSuccessAction.ToString();
stepInfo.FailureAction = step.OnFailAction;
stepInfo.SuccessAction = step.OnSuccessAction;
stepInfo.FailStepId = step.OnFailStep;
stepInfo.SuccessStepId = step.OnSuccessStep;
stepInfo.Command = step.Command;
@@ -103,10 +103,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
stepInfo.JobId = jobId;
stepInfo.JobName = jobName;
stepInfo.StepName = step.Name;
stepInfo.SubSystem = step.SubSystem.ToString();
stepInfo.SubSystem = step.SubSystem;
stepInfo.Id = step.ID;
stepInfo.FailureAction = step.OnFailAction.ToString();
stepInfo.SuccessAction = step.OnSuccessAction.ToString();
stepInfo.FailureAction = step.OnFailAction;
stepInfo.SuccessAction = step.OnSuccessAction;
stepInfo.FailStepId = step.OnFailStep;
stepInfo.SuccessStepId = step.OnSuccessStep;
stepInfo.Command = step.Command;
@@ -221,20 +221,5 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
}
return jobs;
}
public static AgentSubSystem ConvertToAgentSubSytem(string subSystem)
{
switch(subSystem)
{
case ("Transact-SQL script (T-SQL"):
return AgentSubSystem.TransactSql;
case ("Operating system (CmdExec)"):
return AgentSubSystem.CmdExec;
case ("PowerShell"):
return AgentSubSystem.PowerShell;
default:
return AgentSubSystem.TransactSql;
}
}
}
}