|
|
@ -272,12 +272,7 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
if(analyticUnit.status === '404') { |
|
|
|
if(analyticUnit.status === '404') { |
|
|
|
await this.analyticsController.removeAnalyticUnit(analyticUnit.id, true); |
|
|
|
await this.analyticsController.removeAnalyticUnit(analyticUnit.id, true); |
|
|
|
} |
|
|
|
} |
|
|
|
if(analyticUnit.status === 'READY') { |
|
|
|
this.refresh(); |
|
|
|
const { from, to } = this.rangeTimestamp; |
|
|
|
|
|
|
|
await this.analyticsController.fetchSegments(analyticUnit, from, to); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.render(this.seriesList); |
|
|
|
|
|
|
|
this.$scope.$digest(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
appEvents.on('ds-request-response', data => { |
|
|
|
appEvents.on('ds-request-response', data => { |
|
|
@ -326,7 +321,6 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.analyticsController = new AnalyticController(this._grafanaUrl, this._panelId, this.panel, this.events, this.analyticService); |
|
|
|
this.analyticsController = new AnalyticController(this._grafanaUrl, this._panelId, this.panel, this.events, this.analyticService); |
|
|
|
this.analyticsController.fetchAnalyticUnitsStatuses(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this._updatePanelInfo(); |
|
|
|
this._updatePanelInfo(); |
|
|
|
this.analyticsController.updateServerInfo(); |
|
|
|
this.analyticsController.updateServerInfo(); |
|
|
@ -409,15 +403,12 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(this.analyticsController !== undefined) { |
|
|
|
if(this.analyticsController !== undefined) { |
|
|
|
|
|
|
|
await this.analyticsController.fetchAnalyticUnitsSegments(from, to); |
|
|
|
|
|
|
|
// TODO: make statuses and detection spans connected
|
|
|
|
|
|
|
|
this.analyticsController.fetchAnalyticUnitsStatuses(); |
|
|
|
this.analyticsController.stopAnalyticUnitsDetectionsFetching(); |
|
|
|
this.analyticsController.stopAnalyticUnitsDetectionsFetching(); |
|
|
|
const loadTasks = [ |
|
|
|
// TODO: re-run detection waiters if this._dataTimerange is changed
|
|
|
|
// this.annotationsPromise,
|
|
|
|
this.analyticsController.fetchAnalyticUnitsDetections( |
|
|
|
this.analyticsController.fetchAnalyticUnitsSegments(from, to) |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await Promise.all(loadTasks); |
|
|
|
|
|
|
|
// this.annotations = results[0].annotations;
|
|
|
|
|
|
|
|
await this.analyticsController.fetchAnalyticUnitsDetections( |
|
|
|
|
|
|
|
this._dataTimerange.from, |
|
|
|
this._dataTimerange.from, |
|
|
|
this._dataTimerange.to |
|
|
|
this._dataTimerange.to |
|
|
|
); |
|
|
|
); |
|
|
|