From 264c6cb1031e26a6a46260dd9cce2dd2e726986e Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 31 Aug 2018 20:11:33 +0300 Subject: [PATCH] Change Grafana query range from 10% of segments diff to 100% --- server/src/controllers/analytics_controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/controllers/analytics_controller.ts b/server/src/controllers/analytics_controller.ts index 0899c4e..09b6abc 100644 --- a/server/src/controllers/analytics_controller.ts +++ b/server/src/controllers/analytics_controller.ts @@ -81,8 +81,8 @@ function getQueryRangeForLearningBySegments(segments: Segment.Segment[]) { let from = _.minBy(segments, s => s.from).from; let to = _.maxBy(segments, s => s.to).to; let diff = to - from; - from -= Math.round(diff * 0.1); - to += Math.round(diff * 0.1); + from -= Math.round(diff); + to += Math.round(diff); return { from, to }; }