From 31b07cc02c24623ef52bf0ba4e2e4880f83ab17c Mon Sep 17 00:00:00 2001 From: Rajat Dabade Date: Wed, 22 Nov 2023 13:43:29 +0530 Subject: [PATCH] refactor: aggregrate api uses global time (#3911) --- frontend/src/store/actions/trace/getSpans.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/frontend/src/store/actions/trace/getSpans.ts b/frontend/src/store/actions/trace/getSpans.ts index 4b2787e7a9..40d49d5959 100644 --- a/frontend/src/store/actions/trace/getSpans.ts +++ b/frontend/src/store/actions/trace/getSpans.ts @@ -28,23 +28,10 @@ export const GetSpans = ( return; } - const { selectedTime } = globalTime; - if (traces.filterLoading) { return; } - // @TODO refactor this logic when share url functionlity is updated - const isCustomSelected = selectedTime === 'custom'; - - const end = isCustomSelected - ? globalTime.maxTime + 15 * 60 * 1000000000 - : props.end; - - const start = isCustomSelected - ? globalTime.minTime - 15 * 60 * 1000000000 - : props.start; - if (!spansGraph.loading) { dispatch({ type: UPDATE_TRACE_GRAPH_LOADING, @@ -55,12 +42,12 @@ export const GetSpans = ( } const response = await getSpans({ - end, + end: props.end, function: props.function, groupBy: props.groupBy, selectedFilter: props.selectedFilter, selectedTags: props.selectedTags, - start, + start: props.start, step: props.step, isFilterExclude: props.isFilterExclude, spanKind: props.spanKind,