mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 17:23:55 -05:00
Add Name field to AlertInfo (#649)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user