From 173bd01e70fa989b34bf334625d7737e0bd8c8b6 Mon Sep 17 00:00:00 2001 From: dhrubesh Date: Thu, 13 May 2021 20:07:25 +0530 Subject: [PATCH] adds last 1min to store --- frontend/src/store/actions/global.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/store/actions/global.ts b/frontend/src/store/actions/global.ts index 4af5e7adce..4fc8fc7acb 100644 --- a/frontend/src/store/actions/global.ts +++ b/frontend/src/store/actions/global.ts @@ -23,6 +23,11 @@ export const updateTimeInterval = ( // set directly based on that. Assuming datetimeRange values are in ms, and minTime is 0th element switch (interval) { + case "1min": + maxTime = Date.now() * 1000000; // in nano sec + minTime = (Date.now() - 1 * 60 * 1000) * 1000000; + break; + case "15min": maxTime = Date.now() * 1000000; // in nano sec minTime = (Date.now() - 15 * 60 * 1000) * 1000000;