mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-08 19:28:57 +08:00
fix: resize observer charts issue in alerts builder (#5436)
This commit is contained in:
parent
f6b29999c9
commit
bf177882e6
@ -246,17 +246,19 @@ function ChartPreview({
|
|||||||
return (
|
return (
|
||||||
<ChartContainer>
|
<ChartContainer>
|
||||||
{headline}
|
{headline}
|
||||||
|
|
||||||
|
<div ref={graphRef} style={{ height: '100%' }}>
|
||||||
|
{queryResponse.isLoading && (
|
||||||
|
<Spinner size="large" tip="Loading..." height="100%" />
|
||||||
|
)}
|
||||||
{(queryResponse?.isError || queryResponse?.error) && (
|
{(queryResponse?.isError || queryResponse?.error) && (
|
||||||
<FailedMessageContainer color="red" title="Failed to refresh the chart">
|
<FailedMessageContainer color="red" title="Failed to refresh the chart">
|
||||||
<InfoCircleOutlined />{' '}
|
<InfoCircleOutlined />{' '}
|
||||||
{queryResponse.error.message || t('preview_chart_unexpected_error')}
|
{queryResponse.error.message || t('preview_chart_unexpected_error')}
|
||||||
</FailedMessageContainer>
|
</FailedMessageContainer>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{chartData && !queryResponse.isError && (
|
{chartData && !queryResponse.isError && (
|
||||||
<div ref={graphRef} style={{ height: '100%' }}>
|
|
||||||
{queryResponse.isLoading && (
|
|
||||||
<Spinner size="large" tip="Loading..." height="100%" />
|
|
||||||
)}
|
|
||||||
<GridPanelSwitch
|
<GridPanelSwitch
|
||||||
options={options}
|
options={options}
|
||||||
panelType={graphType}
|
panelType={graphType}
|
||||||
@ -268,8 +270,8 @@ function ChartPreview({
|
|||||||
query={query || initialQueriesMap.metrics}
|
query={query || initialQueriesMap.metrics}
|
||||||
yAxisUnit={yAxisUnit}
|
yAxisUnit={yAxisUnit}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</ChartContainer>
|
</ChartContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user