mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
chagned strings to enums and can edit step completion actions (#827)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user