From 872ed9e963c4dd0f31f53759bb8bbfb758ed8074 Mon Sep 17 00:00:00 2001 From: Yunus M Date: Tue, 9 Apr 2024 11:05:49 +0530 Subject: [PATCH] fix: time preference from the panel should be used to fetch data (#4836) --- .../src/container/GridCardLayout/GridCard/FullView/index.tsx | 2 +- frontend/src/container/GridCardLayout/GridCard/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx b/frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx index e4f14e8e19..84df755964 100644 --- a/frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx +++ b/frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx @@ -86,7 +86,7 @@ function FullView({ return { query: updatedQuery, graphType: PANEL_TYPES.LIST, - selectedTime: 'GLOBAL_TIME', + selectedTime: widget?.timePreferance || 'GLOBAL_TIME', globalSelectedInterval: globalSelectedTime, tableParams: { pagination: { diff --git a/frontend/src/container/GridCardLayout/GridCard/index.tsx b/frontend/src/container/GridCardLayout/GridCard/index.tsx index 363cba7f76..5755447d29 100644 --- a/frontend/src/container/GridCardLayout/GridCard/index.tsx +++ b/frontend/src/container/GridCardLayout/GridCard/index.tsx @@ -106,7 +106,7 @@ function GridCardGraph({ return { query: updatedQuery, graphType: PANEL_TYPES.LIST, - selectedTime: 'GLOBAL_TIME', + selectedTime: widget.timePreferance || 'GLOBAL_TIME', globalSelectedInterval, tableParams: { pagination: { @@ -121,7 +121,7 @@ function GridCardGraph({ { ...requestData, variables: getDashboardVariables(variables), - selectedTime: 'GLOBAL_TIME', + selectedTime: widget.timePreferance || 'GLOBAL_TIME', globalSelectedInterval, }, version || DEFAULT_ENTITY_VERSION,