feat(alertlistpanel): support state filter

ref #5981
This commit is contained in:
bergquist
2016-09-14 10:49:05 +02:00
parent b49a642ca5
commit d0f9623037
10 changed files with 81 additions and 24 deletions
+5
View File
@@ -87,6 +87,11 @@ func HandleAlertsQuery(query *m.GetAlertsQuery) error {
sql.WriteString(")")
}
if query.Limit != 0 {
sql.WriteString(" LIMIT ?")
params = append(params, query.Limit)
}
alerts := make([]*m.Alert, 0)
if err := x.Sql(sql.String(), params...).Find(&alerts); err != nil {
return err