Commit 6a8e39ba by Pavel Bakulev

Added uid to AlertNotification json

parent f461d520
...@@ -50,6 +50,7 @@ func formatShort(interval time.Duration) string { ...@@ -50,6 +50,7 @@ func formatShort(interval time.Duration) string {
func NewAlertNotification(notification *models.AlertNotification) *AlertNotification { func NewAlertNotification(notification *models.AlertNotification) *AlertNotification {
return &AlertNotification{ return &AlertNotification{
Id: notification.Id, Id: notification.Id,
Uid: notification.Uid,
Name: notification.Name, Name: notification.Name,
Type: notification.Type, Type: notification.Type,
IsDefault: notification.IsDefault, IsDefault: notification.IsDefault,
...@@ -64,6 +65,7 @@ func NewAlertNotification(notification *models.AlertNotification) *AlertNotifica ...@@ -64,6 +65,7 @@ func NewAlertNotification(notification *models.AlertNotification) *AlertNotifica
type AlertNotification struct { type AlertNotification struct {
Id int64 `json:"id"` Id int64 `json:"id"`
Uid string `json:"uid"`
Name string `json:"name"` Name string `json:"name"`
Type string `json:"type"` Type string `json:"type"`
IsDefault bool `json:"isDefault"` IsDefault bool `json:"isDefault"`
......
...@@ -141,7 +141,7 @@ export class AlertTabCtrl { ...@@ -141,7 +141,7 @@ export class AlertTabCtrl {
iconClass: this.getNotificationIcon(model.type), iconClass: this.getNotificationIcon(model.type),
isDefault: false, isDefault: false,
}); });
this.alert.notifications.push({ id: model.id }); this.alert.notifications.push({ uid: model.uid });
// reset plus button // reset plus button
this.addNotificationSegment.value = this.uiSegmentSrv.newPlusButton().value; this.addNotificationSegment.value = this.uiSegmentSrv.newPlusButton().value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment