|
|
@ -49,7 +49,7 @@ export class AnalyticController { |
|
|
|
this._labelingDataAddedSegments = new SegmentArray<AnalyticSegment>(); |
|
|
|
this._labelingDataAddedSegments = new SegmentArray<AnalyticSegment>(); |
|
|
|
this._labelingDataDeletedSegments = new SegmentArray<AnalyticSegment>(); |
|
|
|
this._labelingDataDeletedSegments = new SegmentArray<AnalyticSegment>(); |
|
|
|
this._analyticUnitsSet = new AnalyticUnitsSet(this._panelObject.anomalyTypes); |
|
|
|
this._analyticUnitsSet = new AnalyticUnitsSet(this._panelObject.anomalyTypes); |
|
|
|
this.analyticUnits.forEach(a => this.runEnabledWaiter(a)); |
|
|
|
// this.analyticUnits.forEach(a => this.runEnabledWaiter(a));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getSegmentsSearcher(): AnalyticSegmentsSearcher { |
|
|
|
getSegmentsSearcher(): AnalyticSegmentsSearcher { |
|
|
@ -88,7 +88,7 @@ export class AnalyticController { |
|
|
|
this._analyticUnitsSet.addItem(this._newAnalyticUnit); |
|
|
|
this._analyticUnitsSet.addItem(this._newAnalyticUnit); |
|
|
|
this._creatingNewAnalyticType = false; |
|
|
|
this._creatingNewAnalyticType = false; |
|
|
|
this._savingNewAnalyticUnit = false; |
|
|
|
this._savingNewAnalyticUnit = false; |
|
|
|
this.runEnabledWaiter(this._newAnalyticUnit); |
|
|
|
// this.runEnabledWaiter(this._newAnalyticUnit);
|
|
|
|
this._runStatusWaiter(this._newAnalyticUnit); |
|
|
|
this._runStatusWaiter(this._newAnalyticUnit); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -358,13 +358,13 @@ export class AnalyticController { |
|
|
|
this._statusRunners.delete(analyticUnit.id); |
|
|
|
this._statusRunners.delete(analyticUnit.id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async runEnabledWaiter(analyticUnit: AnalyticUnit) { |
|
|
|
// async runEnabledWaiter(analyticUnit: AnalyticUnit) {
|
|
|
|
let enabled = await this._analyticService.getAlertEnabled(analyticUnit.id); |
|
|
|
// var enabled = await this._analyticService.getAlertEnabled(analyticUnit.id);
|
|
|
|
if(analyticUnit.alertEnabled !== enabled) { |
|
|
|
// if(analyticUnit.alertEnabled !== enabled) {
|
|
|
|
analyticUnit.alertEnabled = enabled; |
|
|
|
// analyticUnit.alertEnabled = enabled;
|
|
|
|
this._emitter.emit('anomaly-type-alert-change', analyticUnit); |
|
|
|
// this._emitter.emit('anomaly-type-alert-change', analyticUnit);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
async toggleAlertEnabled(analyticUnit: AnalyticUnit) { |
|
|
|
async toggleAlertEnabled(analyticUnit: AnalyticUnit) { |
|
|
|
var enabled = analyticUnit.alertEnabled; |
|
|
|
var enabled = analyticUnit.alertEnabled; |
|
|
|