make default values for alerting configurable

This commit is contained in:
bergquist
2018-09-06 11:20:38 +02:00
parent 72ab24f300
commit 3ce89cad71
7 changed files with 46 additions and 18 deletions

View File

@@ -22,6 +22,8 @@ export class Settings {
disableLoginForm: boolean;
defaultDatasource: string;
alertingEnabled: boolean;
alertingErrorOrTimeout: string;
alertingNoDataOrNullValues: string;
authProxyEnabled: boolean;
exploreEnabled: boolean;
ldapEnabled: boolean;

View File

@@ -164,8 +164,8 @@ export class AlertTabCtrl {
alert.conditions.push(this.buildDefaultCondition());
}
alert.noDataState = alert.noDataState || 'no_data';
alert.executionErrorState = alert.executionErrorState || 'alerting';
alert.noDataState = alert.noDataState || config.alertingNoDataOrNullValues;
alert.executionErrorState = alert.executionErrorState || config.alertingErrorOrTimeout;
alert.frequency = alert.frequency || '60s';
alert.handler = alert.handler || 1;
alert.notifications = alert.notifications || [];