Add Name field to AlertInfo (#649)

This commit is contained in:
Karl Burtram
2018-06-30 11:16:54 -07:00
committed by GitHub
parent 704b25f082
commit d86a1ce1d3
2 changed files with 6 additions and 4 deletions

View File

@@ -424,23 +424,24 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
alerts[i] = new AgentAlertInfo
{
Id = alert.ID,
Name = alert.Name,
DelayBetweenResponses = alert.DelayBetweenResponses,
EventDescriptionKeyword = alert.EventDescriptionKeyword,
EventSource = alert.EventSource,
HasNotification = alert.HasNotification,
IncludeEventDescription = (Contracts.NotifyMethods)alert.IncludeEventDescription,
IsEnabled = alert.IsEnabled,
JobId = alert.JobID != null ? alert.JobID.ToString() : null,
JobId = alert.JobID.ToString(),
JobName = alert.JobName,
LastOccurrenceDate = alert.LastOccurrenceDate != null ? alert.LastOccurrenceDate.ToString() : null,
LastResponseDate = alert.LastResponseDate != null ? alert.LastResponseDate.ToString() : null,
LastOccurrenceDate =alert.LastOccurrenceDate.ToString(),
LastResponseDate = alert.LastResponseDate.ToString(),
MessageId = alert.MessageID,
NotificationMessage = alert.NotificationMessage,
OccurrenceCount = alert.OccurrenceCount,
PerformanceCondition = alert.PerformanceCondition,
Severity = alert.Severity,
DatabaseName = alert.DatabaseName,
CountResetDate = alert.CountResetDate != null ? alert.CountResetDate.ToString() : null,
CountResetDate = alert.CountResetDate.ToString(),
CategoryName = alert.CategoryName,
AlertType = (Contracts.AlertType)alert.AlertType,
WmiEventNamespace = alert.WmiEventNamespace,

View File

@@ -33,6 +33,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
public class AgentAlertInfo
{
public int Id { get; set; }
public string Name { get; set; }
public int DelayBetweenResponses { get; set; }
public string EventDescriptionKeyword { get; set; }
public string EventSource { get; set; }