refactor(): dashboard row model and hunting down memory leak

This commit is contained in:
Torkel Ödegaard
2016-10-30 15:14:18 +01:00
parent 57cbefdf0a
commit 4d420a0c33
20 changed files with 364 additions and 45 deletions

View File

@@ -52,11 +52,12 @@ export class AlertTabCtrl {
var thresholdChangedEventHandler = this.graphThresholdChanged.bind(this);
this.panelCtrl.events.on('threshold-changed', thresholdChangedEventHandler);
// set panel alert edit mode
this.$scope.$on("$destroy", () => {
// set panel alert edit mode
var unbind = this.$scope.$on("$destroy", () => {
this.panelCtrl.events.off("threshold-changed", thresholdChangedEventHandler);
this.panelCtrl.editingThresholds = false;
this.panelCtrl.render();
unbind();
});
// build notification model