mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'alertList-notOK'
This commit is contained in:
commit
1a3170373a
@ -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 = strings.TrimPrefix(v, "not_")
|
||||
} 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