mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Agent/improve steps (#710)
* added stepInfo for editing jobs/steps * added schedules to history requests * added alerts and schedules to history * formatting * code review comments * removed smo import * changed and optimized histories, steps, alerts and operators
This commit is contained in:
@@ -8,6 +8,25 @@ using Microsoft.SqlTools.ServiceLayer.Agent;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
||||
{
|
||||
public enum JobCompletionActionCondition
|
||||
{
|
||||
Never = 0,
|
||||
OnSuccess = 1,
|
||||
OnFailure = 2,
|
||||
Always = 3
|
||||
}
|
||||
|
||||
public enum JobExecutionStatus
|
||||
{
|
||||
Executing = 1,
|
||||
WaitingForWorkerThread = 2,
|
||||
BetweenRetries = 3,
|
||||
Idle = 4,
|
||||
Suspended = 5,
|
||||
WaitingForStepToFinish = 6,
|
||||
PerformingCompletionAction = 7
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a class for storing various properties of agent jobs,
|
||||
/// used by the Job Activity Monitor
|
||||
@@ -17,8 +36,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
||||
public string Name { get; set; }
|
||||
public string Owner { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int CurrentExecutionStatus { get; set; }
|
||||
public int LastRunOutcome { get; set; }
|
||||
public JobExecutionStatus CurrentExecutionStatus { get; set; }
|
||||
public CompletionResult LastRunOutcome { get; set; }
|
||||
public string CurrentExecutionStep { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public bool HasTarget { get; set; }
|
||||
@@ -31,5 +50,15 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
||||
public string LastRun { get; set; }
|
||||
public string NextRun { get; set; }
|
||||
public string JobId { get; set; }
|
||||
public string OperatorToEmail { get; set; }
|
||||
public string OperatorToPage { get; set; }
|
||||
public int StartStepID { get; set; }
|
||||
public JobCompletionActionCondition EmailLevel { get; set; }
|
||||
public JobCompletionActionCondition PageLevel { get; set; }
|
||||
public JobCompletionActionCondition EventLogLevel { get; set; }
|
||||
public JobCompletionActionCondition DeleteLevel { get; set; }
|
||||
public AgentJobStepInfo[] JobSteps { get; set; }
|
||||
public AgentScheduleInfo[] JobSchedules { get; set; }
|
||||
public AgentAlertInfo[] Alerts { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
||||
public string OwnerUri { get; set; }
|
||||
|
||||
public string JobId { get; set; }
|
||||
public string JobName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -142,7 +143,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
||||
/// </summary>
|
||||
public class AgentJobHistoryResult : ResultStatus
|
||||
{
|
||||
public AgentJobHistoryInfo[] Jobs { get; set; }
|
||||
public AgentJobHistoryInfo[] Histories { get; set; }
|
||||
public AgentJobStepInfo[] Steps { get; set; }
|
||||
public AgentScheduleInfo[] Schedules { get; set; }
|
||||
public AgentAlertInfo[] Alerts { get; set ;}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user