mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -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
|
alerts[i] = new AgentAlertInfo
|
||||||
{
|
{
|
||||||
Id = alert.ID,
|
Id = alert.ID,
|
||||||
|
Name = alert.Name,
|
||||||
DelayBetweenResponses = alert.DelayBetweenResponses,
|
DelayBetweenResponses = alert.DelayBetweenResponses,
|
||||||
EventDescriptionKeyword = alert.EventDescriptionKeyword,
|
EventDescriptionKeyword = alert.EventDescriptionKeyword,
|
||||||
EventSource = alert.EventSource,
|
EventSource = alert.EventSource,
|
||||||
HasNotification = alert.HasNotification,
|
HasNotification = alert.HasNotification,
|
||||||
IncludeEventDescription = (Contracts.NotifyMethods)alert.IncludeEventDescription,
|
IncludeEventDescription = (Contracts.NotifyMethods)alert.IncludeEventDescription,
|
||||||
IsEnabled = alert.IsEnabled,
|
IsEnabled = alert.IsEnabled,
|
||||||
JobId = alert.JobID != null ? alert.JobID.ToString() : null,
|
JobId = alert.JobID.ToString(),
|
||||||
JobName = alert.JobName,
|
JobName = alert.JobName,
|
||||||
LastOccurrenceDate = alert.LastOccurrenceDate != null ? alert.LastOccurrenceDate.ToString() : null,
|
LastOccurrenceDate =alert.LastOccurrenceDate.ToString(),
|
||||||
LastResponseDate = alert.LastResponseDate != null ? alert.LastResponseDate.ToString() : null,
|
LastResponseDate = alert.LastResponseDate.ToString(),
|
||||||
MessageId = alert.MessageID,
|
MessageId = alert.MessageID,
|
||||||
NotificationMessage = alert.NotificationMessage,
|
NotificationMessage = alert.NotificationMessage,
|
||||||
OccurrenceCount = alert.OccurrenceCount,
|
OccurrenceCount = alert.OccurrenceCount,
|
||||||
PerformanceCondition = alert.PerformanceCondition,
|
PerformanceCondition = alert.PerformanceCondition,
|
||||||
Severity = alert.Severity,
|
Severity = alert.Severity,
|
||||||
DatabaseName = alert.DatabaseName,
|
DatabaseName = alert.DatabaseName,
|
||||||
CountResetDate = alert.CountResetDate != null ? alert.CountResetDate.ToString() : null,
|
CountResetDate = alert.CountResetDate.ToString(),
|
||||||
CategoryName = alert.CategoryName,
|
CategoryName = alert.CategoryName,
|
||||||
AlertType = (Contracts.AlertType)alert.AlertType,
|
AlertType = (Contracts.AlertType)alert.AlertType,
|
||||||
WmiEventNamespace = alert.WmiEventNamespace,
|
WmiEventNamespace = alert.WmiEventNamespace,
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
|||||||
public class AgentAlertInfo
|
public class AgentAlertInfo
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
public int DelayBetweenResponses { get; set; }
|
public int DelayBetweenResponses { get; set; }
|
||||||
public string EventDescriptionKeyword { get; set; }
|
public string EventDescriptionKeyword { get; set; }
|
||||||
public string EventSource { get; set; }
|
public string EventSource { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user