Skip to content

Commit

Permalink
Send dashboard timerange on "Redetect all"
Browse files Browse the repository at this point in the history
  • Loading branch information
rozetko committed May 20, 2019
1 parent 8904074 commit 581558a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/panel/graph_panel/controllers/analytic_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ 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();
unit.detectionSpans = [];
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();
}
Expand Down
3 changes: 2 additions & 1 deletion src/panel/graph_panel/graph_ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 581558a

Please sign in to comment.