From 80c0b5621d71c057e6bb33f38d4fb8bacff26c11 Mon Sep 17 00:00:00 2001 From: Palash gupta Date: Tue, 10 May 2022 17:09:39 +0530 Subject: [PATCH] fix: error handling is updated in trace --- frontend/src/container/Trace/Graph/index.tsx | 2 +- .../src/store/actions/trace/getInitialFilter.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/Trace/Graph/index.tsx b/frontend/src/container/Trace/Graph/index.tsx index 179ff792de..56d2d310a9 100644 --- a/frontend/src/container/Trace/Graph/index.tsx +++ b/frontend/src/container/Trace/Graph/index.tsx @@ -34,7 +34,7 @@ function TraceGraph(): JSX.Element { ); } - if (loading || payload === undefined) { + if (loading) { return ( diff --git a/frontend/src/store/actions/trace/getInitialFilter.ts b/frontend/src/store/actions/trace/getInitialFilter.ts index fcc9c08b1c..ea6487d78e 100644 --- a/frontend/src/store/actions/trace/getInitialFilter.ts +++ b/frontend/src/store/actions/trace/getInitialFilter.ts @@ -7,6 +7,7 @@ import AppActions from 'types/actions'; import { UPDATE_ALL_FILTERS, UPDATE_TRACE_FILTER_LOADING, + UPDATE_TRACE_GRAPH_LOADING, } from 'types/actions/trace'; import { GlobalReducer } from 'types/reducer/globalTime'; import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace'; @@ -183,6 +184,12 @@ export const GetInitialTraceFilter = ( filterLoading: false, }, }); + dispatch({ + type: UPDATE_TRACE_GRAPH_LOADING, + payload: { + loading: false, + }, + }); } catch (error) { console.log(error); dispatch({ @@ -191,6 +198,12 @@ export const GetInitialTraceFilter = ( filterLoading: false, }, }); + dispatch({ + type: UPDATE_TRACE_GRAPH_LOADING, + payload: { + loading: false, + }, + }); } }; };