File tree Expand file tree Collapse file tree 4 files changed +27
-2
lines changed
public/app/plugins/panel/graph/partials Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,19 @@ func GetAlertNotifications(c *middleware.Context) Response {
166
166
return ApiError (500 , "Failed to get alert notifications" , err )
167
167
}
168
168
169
- return Json (200 , query .Result )
169
+ var result []dtos.AlertNotificationDTO
170
+
171
+ for _ , notification := range query .Result {
172
+ result = append (result , dtos.AlertNotificationDTO {
173
+ Id : notification .Id ,
174
+ Name : notification .Name ,
175
+ Type : notification .Type ,
176
+ Created : notification .Created ,
177
+ Updated : notification .Updated ,
178
+ })
179
+ }
180
+
181
+ return Json (200 , result )
170
182
}
171
183
172
184
func GetAlertNotificationById (c * middleware.Context ) Response {
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ func Register(r *macaron.Macaron) {
263
263
r .Delete ("/:notificationId" , wrap (DeleteAlertNotification ))
264
264
})
265
265
266
- r .Get ("/changes" , wrap (GetAlertChanges ))
266
+ // r.Get("/changes", wrap(GetAlertChanges))
267
267
})
268
268
269
269
// error test
Original file line number Diff line number Diff line change 1
1
package dtos
2
2
3
+ import "time"
4
+
3
5
type AlertRuleDTO struct {
4
6
Id int64 `json:"id"`
5
7
DashboardId int64 `json:"dashboardId"`
@@ -19,3 +21,11 @@ type AlertRuleDTO struct {
19
21
20
22
DashbboardUri string `json:"dashboardUri"`
21
23
}
24
+
25
+ type AlertNotificationDTO struct {
26
+ Id int64 `json:"id"`
27
+ Name string `json:"name"`
28
+ Type string `json:"type"`
29
+ Created time.Time `json:"created"`
30
+ Updated time.Time `json:"updated"`
31
+ }
Original file line number Diff line number Diff line change @@ -109,8 +109,11 @@ <h5 class="section-heading">Notifications</h5>
109
109
< div class ="gf-form-inline ">
110
110
< div class ="gf-form ">
111
111
< span class ="gf-form-label "> Groups</ span >
112
+ < input class ="gf-form-input max-width-7 " type ="text " ng-model ="ctrl.alert.notify "> </ input >
113
+ <!--
112
114
<bootstrap-tagsinput ng-model="ctrl.alert.notify" tagclass="label label-tag" placeholder="add tags">
113
115
</bootstrap-tagsinput>
116
+ -->
114
117
</ div >
115
118
</ div >
116
119
</ div >
You can’t perform that action at this time.
0 commit comments