From 581558a0fe7cc0e9d0ae58d442e1e5721656cda2 Mon Sep 17 00:00:00 2001 From: rozetko Date: Mon, 20 May 2019 14:58:27 +0300 Subject: [PATCH] Send dashboard timerange on "Redetect all" --- src/panel/graph_panel/controllers/analytic_controller.ts | 4 ++-- src/panel/graph_panel/graph_ctrl.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/panel/graph_panel/controllers/analytic_controller.ts b/src/panel/graph_panel/controllers/analytic_controller.ts index 0312108..f8a4fec 100644 --- a/src/panel/graph_panel/controllers/analytic_controller.ts +++ b/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(); } diff --git a/src/panel/graph_panel/graph_ctrl.ts b/src/panel/graph_panel/graph_ctrl.ts index 0f06577..8472b35 100644 --- a/src/panel/graph_panel/graph_ctrl.ts +++ b/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) {