fix: alert list panel now works correctly after adding manual annotation on dashboard, fixes #9951

This commit is contained in:
Torkel Ödegaard
2017-11-21 11:27:53 +01:00
parent 14b8bd35ed
commit 0d12b37dfd
5 changed files with 21 additions and 0 deletions

View File

@@ -158,6 +158,10 @@ func (r *SqlAnnotationRepo) Find(query *annotations.ItemQuery) ([]*annotations.I
params = append(params, query.From, query.To)
}
if query.Type == "alert" {
sql.WriteString(` AND annotation.alert_id > 0`)
}
if len(query.Tags) > 0 {
keyValueFilters := []string{}