From 5c47c78845d62b21645c58fab93b76b860c710f6 Mon Sep 17 00:00:00 2001 From: amper43 Date: Mon, 1 Oct 2018 19:44:30 +0300 Subject: [PATCH] Revert "Merge pull request #73 from hastic/restore-hooks-api-#149" This reverts commit edc3fb0ac0ddf606afd211c58896fc73154b2444, reversing changes made to 5e9cda93910308a111d41f5cd0c05a5842ada2e9. --- src/controllers/analytic_controller.ts | 18 +++++++++--------- src/partials/tab_analytics.html | 4 ++-- src/services/analytic_service.ts | 2 -- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/controllers/analytic_controller.ts b/src/controllers/analytic_controller.ts index aab7741..7e9272c 100644 --- a/src/controllers/analytic_controller.ts +++ b/src/controllers/analytic_controller.ts @@ -49,7 +49,7 @@ export class AnalyticController { this._labelingDataAddedSegments = new SegmentArray(); this._labelingDataDeletedSegments = new SegmentArray(); this._analyticUnitsSet = new AnalyticUnitsSet(this._panelObject.anomalyTypes); - this.analyticUnits.forEach(a => this.runEnabledWaiter(a)); + // this.analyticUnits.forEach(a => this.runEnabledWaiter(a)); } getSegmentsSearcher(): AnalyticSegmentsSearcher { @@ -88,7 +88,7 @@ export class AnalyticController { this._analyticUnitsSet.addItem(this._newAnalyticUnit); this._creatingNewAnalyticType = false; this._savingNewAnalyticUnit = false; - this.runEnabledWaiter(this._newAnalyticUnit); + // this.runEnabledWaiter(this._newAnalyticUnit); this._runStatusWaiter(this._newAnalyticUnit); } @@ -358,13 +358,13 @@ export class AnalyticController { this._statusRunners.delete(analyticUnit.id); } - async runEnabledWaiter(analyticUnit: AnalyticUnit) { - let enabled = await this._analyticService.getAlertEnabled(analyticUnit.id); - if(analyticUnit.alertEnabled !== enabled) { - analyticUnit.alertEnabled = enabled; - this._emitter.emit('anomaly-type-alert-change', analyticUnit); - } - } + // async runEnabledWaiter(analyticUnit: AnalyticUnit) { + // var enabled = await this._analyticService.getAlertEnabled(analyticUnit.id); + // if(analyticUnit.alertEnabled !== enabled) { + // analyticUnit.alertEnabled = enabled; + // this._emitter.emit('anomaly-type-alert-change', analyticUnit); + // } + // } async toggleAlertEnabled(analyticUnit: AnalyticUnit) { var enabled = analyticUnit.alertEnabled; diff --git a/src/partials/tab_analytics.html b/src/partials/tab_analytics.html index e0728e6..69ebff7 100644 --- a/src/partials/tab_analytics.html +++ b/src/partials/tab_analytics.html @@ -49,7 +49,7 @@ - +