diff --git a/public/app/plugins/panel/graph/alert_tab_ctrl.ts b/public/app/plugins/panel/graph/alert_tab_ctrl.ts index aeb371e2f19..0db461a9b3b 100644 --- a/public/app/plugins/panel/graph/alert_tab_ctrl.ts +++ b/public/app/plugins/panel/graph/alert_tab_ctrl.ts @@ -7,15 +7,20 @@ import angular from 'angular'; export class AlertTabCtrl { panel: any; panelCtrl: any; + alerting: any; /** @ngInject */ constructor($scope) { $scope.alertTab = this; this.panelCtrl = $scope.ctrl; this.panel = this.panelCtrl.panel; + this.alerting = this.alerting || {}; + + + this.convertThresholdsToAlertThresholds(); } - convertThresholdsToAlerts() { + convertThresholdsToAlertThresholds() { if (this.panel.grid && this.panel.grid.threshold1) { this.panel.alerting.warnLevel = '< ' + this.panel.grid.threshold1; } @@ -34,7 +39,5 @@ export function graphAlertEditor() { scope: true, templateUrl: 'public/app/plugins/panel/graph/partials/tab_alerting.html', controller: AlertTabCtrl, - //bindToController: true, - //controllerAs: 'ctrl', }; } diff --git a/public/app/plugins/panel/graph/partials/tab_alerting.html b/public/app/plugins/panel/graph/partials/tab_alerting.html index a48dafa453d..d5cb725c9cb 100644 --- a/public/app/plugins/panel/graph/partials/tab_alerting.html +++ b/public/app/plugins/panel/graph/partials/tab_alerting.html @@ -14,7 +14,6 @@
We noticed you have existing threshholds.Convert them