Added more options to job changes and elaborated error messages (#775)

* job step type and error message details change

* added newline for both environments

* checked for inner exceptions

* sorted imports
This commit is contained in:
Aditya Bist
2019-03-07 11:42:20 -08:00
committed by GitHub
parent 01bcfd8df9
commit a08666af0f
5 changed files with 71 additions and 22 deletions

View File

@@ -659,10 +659,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
if (jobInfo != null)
{
this.currentName = jobInfo.Name;
this.owner = jobInfo.Owner;
this.description = jobInfo.Description;
this.enabled = jobInfo.Enabled;
this.Owner = jobInfo.Owner;
this.Description = jobInfo.Description;
this.Enabled = jobInfo.Enabled;
this.startStepID = jobInfo.StartStepId;
this.Category = ConvertStringToCategory(jobInfo.Category);
}
}
#endregion

View File

@@ -188,6 +188,21 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
}
}
/// <summary>
/// SubSystem
/// </summary>
public AgentSubSystem Subsystem
{
get
{
return this.subSystem;
}
set
{
this.subSystem = value;
}
}
/// <summary>
/// indicates whether the job exists on the server
/// </summary>

View File

@@ -5,6 +5,7 @@
using System;
using Microsoft.SqlServer.Management.Smo.Agent;
using Microsoft.SqlTools.ServiceLayer.Agent;
using Microsoft.SqlTools.ServiceLayer.Agent.Contracts;
using Microsoft.SqlTools.ServiceLayer.Management;
@@ -43,6 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
this.data.ID = stepInfo.Id;
this.data.Name = stepInfo.StepName;
this.data.Command = stepInfo.Command;
this.data.Subsystem = AgentUtilities.ConvertToAgentSubSytem(stepInfo.SubSystem);
}
protected override bool DoPreProcessExecution(RunType runType, out ExecutionMode executionResult)