|
|
|
@ -49,7 +49,7 @@ export class AnalyticController {
|
|
|
|
|
this._labelingDataAddedSegments = new SegmentArray<AnalyticSegment>(); |
|
|
|
|
this._labelingDataDeletedSegments = new SegmentArray<AnalyticSegment>(); |
|
|
|
|
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; |
|
|
|
|