From ca7baca21d8e2acd09c3e590f0cf2ca183941aae Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 15 Dec 2016 11:13:19 +0100 Subject: [PATCH] feat(alerting): adds ok as no data option closes #6866 --- pkg/models/alert.go | 5 +++-- public/app/features/alerting/alert_def.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/models/alert.go b/pkg/models/alert.go index 67170a0dd36..0d2289c0678 100644 --- a/pkg/models/alert.go +++ b/pkg/models/alert.go @@ -20,9 +20,10 @@ const ( ) const ( + NoDataSetOK NoDataOption = "ok" NoDataSetNoData NoDataOption = "no_data" - NoDataSetAlerting NoDataOption = "alerting" NoDataKeepState NoDataOption = "keep_state" + NoDataSetAlerting NoDataOption = "alerting" ) const ( @@ -35,7 +36,7 @@ func (s AlertStateType) IsValid() bool { } func (s NoDataOption) IsValid() bool { - return s == NoDataSetNoData || s == NoDataSetAlerting || s == NoDataKeepState + return s == NoDataSetNoData || s == NoDataSetAlerting || s == NoDataKeepState || s == NoDataSetOK } func (s NoDataOption) ToAlertState() AlertStateType { diff --git a/public/app/features/alerting/alert_def.ts b/public/app/features/alerting/alert_def.ts index 804a9f3d083..fd08823c4a9 100644 --- a/public/app/features/alerting/alert_def.ts +++ b/public/app/features/alerting/alert_def.ts @@ -47,6 +47,7 @@ var noDataModes = [ {text: 'Alerting', value: 'alerting'}, {text: 'No Data', value: 'no_data'}, {text: 'Keep Last State', value: 'keep_state'}, + {text: 'Ok', value: 'ok'}, ]; var executionErrorModes = [