mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
not ok option to alert list, fixes: #9754
This commit is contained in:
parent
c44f6e2ec2
commit
9ad186bcc9
@ -94,7 +94,12 @@ func HandleAlertsQuery(query *m.GetAlertsQuery) error {
|
||||
if i > 0 {
|
||||
sql.WriteString(" OR ")
|
||||
}
|
||||
sql.WriteString("state = ? ")
|
||||
if strings.HasPrefix(v, "not") {
|
||||
sql.WriteString("state <> ? ")
|
||||
v = v[4:]
|
||||
} else {
|
||||
sql.WriteString("state = ? ")
|
||||
}
|
||||
params = append(params, v)
|
||||
}
|
||||
sql.WriteString(")")
|
||||
|
@ -11,6 +11,7 @@ export class AlertListCtrl {
|
||||
stateFilters = [
|
||||
{text: 'All', value: null},
|
||||
{text: 'OK', value: 'ok'},
|
||||
{text: 'Not OK', value: 'not_ok'},
|
||||
{text: 'Alerting', value: 'alerting'},
|
||||
{text: 'No Data', value: 'no_data'},
|
||||
{text: 'Paused', value: 'paused'},
|
||||
|
Loading…
Reference in New Issue
Block a user