Merge pull request #1123 from palash-signoz/trace-handling

fix: error handling is updated in trace
This commit is contained in:
palash-signoz 2022-05-13 10:44:15 +05:30 committed by GitHub
commit 3890e06d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -34,7 +34,7 @@ function TraceGraph(): JSX.Element {
);
}
if (loading || payload === undefined) {
if (loading) {
return (
<Container>
<Spinner height="20vh" size="small" tip="Loading..." />

View File

@ -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,
},
});
}
};
};