feat(notifications): add support for default notifications

ref #5883
This commit is contained in:
bergquist
2016-09-05 21:35:37 +02:00
parent eb0396ad95
commit c893e5d241
10 changed files with 89 additions and 57 deletions
+6 -5
View File
@@ -157,11 +157,12 @@ func GetAlertNotifications(c *middleware.Context) Response {
for _, notification := range query.Result {
result = append(result, dtos.AlertNotification{
Id: notification.Id,
Name: notification.Name,
Type: notification.Type,
Created: notification.Created,
Updated: notification.Updated,
Id: notification.Id,
Name: notification.Name,
Type: notification.Type,
IsDefault: notification.IsDefault,
Created: notification.Created,
Updated: notification.Updated,
})
}
+6 -5
View File
@@ -22,11 +22,12 @@ type AlertRule struct {
}
type AlertNotification struct {
Id int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Id int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
IsDefault bool `json:"isDefault"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
type AlertTestCommand struct {