Browse Source

Send dashboard timerange on "Redetect all"

master
rozetko 5 years ago
parent
commit
581558a0fe
  1. 4
      src/panel/graph_panel/controllers/analytic_controller.ts
  2. 3
      src/panel/graph_panel/graph_ctrl.ts

4
src/panel/graph_panel/controllers/analytic_controller.ts

@ -314,7 +314,7 @@ export class AnalyticController {
return newIds;
}
async redetectAll() {
async redetectAll(from?: number, to?: number) {
this.analyticUnits.forEach(unit => {
// TODO: remove duplication with runDetect
unit.segments.clear();
@ -322,7 +322,7 @@ export class AnalyticController {
unit.status = null;
});
const ids = this.analyticUnits.map(analyticUnit => analyticUnit.id);
await this._analyticService.runDetect(ids);
await this._analyticService.runDetect(ids, from, to);
this.fetchAnalyticUnitsStatuses();
}

3
src/panel/graph_panel/graph_ctrl.ts

@ -567,7 +567,8 @@ class GraphCtrl extends MetricsPanelCtrl {
}
redetectAll() {
this.analyticsController.redetectAll();
const { from, to } = this.rangeTimestamp;
this.analyticsController.redetectAll(from, to);
}
async runDetectInCurrentRange(analyticUnitId: AnalyticUnitId) {

Loading…
Cancel
Save