mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-16 15:45:56 +08:00
refactor: updated loading state in gridgraphlayout (#3313)
Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
parent
86b725757c
commit
1fc0461c0f
@ -101,7 +101,7 @@ function GridCardGraph({
|
||||
|
||||
const isEmptyLayout = widget?.id === 'empty' || isEmpty(widget);
|
||||
|
||||
if (queryResponse.isRefetching) {
|
||||
if (queryResponse.isRefetching || queryResponse.isLoading) {
|
||||
return <Spinner height="20vh" tip="Loading..." />;
|
||||
}
|
||||
|
||||
@ -127,10 +127,9 @@ function GridCardGraph({
|
||||
);
|
||||
}
|
||||
|
||||
if (queryResponse.status === 'loading' || queryResponse.status === 'idle') {
|
||||
if (!isEmpty(widget) && prevChartDataSetRef?.labels) {
|
||||
return (
|
||||
<span ref={graphRef}>
|
||||
{!isEmpty(widget) && prevChartDataSetRef?.labels ? (
|
||||
<WidgetGraphComponent
|
||||
enableModel={false}
|
||||
enableWidgetHeader
|
||||
@ -145,9 +144,6 @@ function GridCardGraph({
|
||||
headerMenuList={headerMenuList}
|
||||
onClickHandler={onClickHandler}
|
||||
/>
|
||||
) : (
|
||||
<Spinner height="20vh" tip="Loading..." />
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user