From c619b198c8411e34151bdc58d68abdcef574ec44 Mon Sep 17 00:00:00 2001 From: maryliag Date: Fri, 3 Feb 2023 13:05:15 -0500 Subject: [PATCH] ui: fix time scale selection When making a call to retrieve the list of fingerprints per index, it was suppose to use the round dates from the time picker, otherwise it wouldn't get the rounded hour that has the aggregated timestamp. Epic: None Release note: None --- pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts index 13f48db37245..5ff916c99761 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/indexDetailsApi.ts @@ -20,7 +20,7 @@ import { StatementRawFormat, } from "src/api"; import moment from "moment"; -import { TimeScale, toDateRange } from "../timeScaleDropdown"; +import { TimeScale, toRoundedDateRange } from "../timeScaleDropdown"; import { AggregateStatistics } from "../statementsTable"; import { INTERNAL_APP_NAME_PREFIX } from "../recentExecutions/recentStatementUtils"; @@ -79,7 +79,7 @@ export function StatementsListRequestFromDetails( ts: TimeScale, ): StatementsUsingIndexRequest { if (ts === null) return { table, index, database }; - const [start, end] = toDateRange(ts); + const [start, end] = toRoundedDateRange(ts); return { table, index, database, start, end }; }