Merge branch 'master' into redux-poc2

This commit is contained in:
Torkel Ödegaard
2018-09-05 12:11:11 +02:00
419 changed files with 8058 additions and 5648 deletions

View File

@@ -11,6 +11,8 @@ export class AlertNotificationEditCtrl {
model: any;
defaults: any = {
type: 'email',
sendReminder: false,
frequency: '15m',
settings: {
httpMethod: 'POST',
autoResolve: true,
@@ -18,12 +20,17 @@ export class AlertNotificationEditCtrl {
},
isDefault: false,
};
getFrequencySuggestion: any;
/** @ngInject */
constructor(private $routeParams, private backendSrv, private $location, private $templateCache, navModelSrv) {
this.navModel = navModelSrv.getNav('alerting', 'channels', 0);
this.isNew = !this.$routeParams.id;
this.getFrequencySuggestion = () => {
return ['1m', '5m', '10m', '15m', '30m', '1h'];
};
this.backendSrv
.get(`/api/alert-notifiers`)
.then(notifiers => {
@@ -102,6 +109,7 @@ export class AlertNotificationEditCtrl {
const payload = {
name: this.model.name,
type: this.model.type,
frequency: this.model.frequency,
settings: this.model.settings,
};