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);
|
const isEmptyLayout = widget?.id === 'empty' || isEmpty(widget);
|
||||||
|
|
||||||
if (queryResponse.isRefetching) {
|
if (queryResponse.isRefetching || queryResponse.isLoading) {
|
||||||
return <Spinner height="20vh" tip="Loading..." />;
|
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 (
|
return (
|
||||||
<span ref={graphRef}>
|
<span ref={graphRef}>
|
||||||
{!isEmpty(widget) && prevChartDataSetRef?.labels ? (
|
|
||||||
<WidgetGraphComponent
|
<WidgetGraphComponent
|
||||||
enableModel={false}
|
enableModel={false}
|
||||||
enableWidgetHeader
|
enableWidgetHeader
|
||||||
@ -145,9 +144,6 @@ function GridCardGraph({
|
|||||||
headerMenuList={headerMenuList}
|
headerMenuList={headerMenuList}
|
||||||
onClickHandler={onClickHandler}
|
onClickHandler={onClickHandler}
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<Spinner height="20vh" tip="Loading..." />
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user