mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 14:55:52 +08:00
fix: new widget condition is fixed and handling of undefined is done (#2906)
This commit is contained in:
parent
389385324f
commit
3792f137fa
@ -83,14 +83,14 @@ function GridCardGraph({
|
|||||||
const queryResponse = useGetQueryRange(
|
const queryResponse = useGetQueryRange(
|
||||||
{
|
{
|
||||||
selectedTime: widget?.timePreferance,
|
selectedTime: widget?.timePreferance,
|
||||||
graphType: widget.panelTypes,
|
graphType: widget?.panelTypes,
|
||||||
query: widget.query,
|
query: widget?.query,
|
||||||
globalSelectedInterval,
|
globalSelectedInterval,
|
||||||
variables: getDashboardVariables(),
|
variables: getDashboardVariables(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
queryKey: [
|
queryKey: [
|
||||||
`GetMetricsQueryRange-${widget?.timePreferance}-${globalSelectedInterval}-${widget.id}`,
|
`GetMetricsQueryRange-${widget?.timePreferance}-${globalSelectedInterval}-${widget?.id}`,
|
||||||
widget,
|
widget,
|
||||||
maxTime,
|
maxTime,
|
||||||
minTime,
|
minTime,
|
||||||
@ -173,7 +173,7 @@ function GridCardGraph({
|
|||||||
{
|
{
|
||||||
data: selectedDashboard.data,
|
data: selectedDashboard.data,
|
||||||
generateWidgetId: uuid,
|
generateWidgetId: uuid,
|
||||||
graphType: widget.panelTypes,
|
graphType: widget?.panelTypes,
|
||||||
selectedDashboard,
|
selectedDashboard,
|
||||||
layout,
|
layout,
|
||||||
widgetData: widget,
|
widgetData: widget,
|
||||||
@ -187,7 +187,7 @@ function GridCardGraph({
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
history.push(
|
history.push(
|
||||||
`${history.location.pathname}/new?graphType=${widget.panelTypes}&widgetId=${uuid}`,
|
`${history.location.pathname}/new?graphType=${widget?.panelTypes}&widgetId=${uuid}`,
|
||||||
);
|
);
|
||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
@ -253,10 +253,10 @@ function GridCardGraph({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<GridGraphComponent
|
<GridGraphComponent
|
||||||
GRAPH_TYPES={widget.panelTypes}
|
GRAPH_TYPES={widget?.panelTypes}
|
||||||
data={prevChartDataSetRef}
|
data={prevChartDataSetRef}
|
||||||
isStacked={widget.isStacked}
|
isStacked={widget?.isStacked}
|
||||||
opacity={widget.opacity}
|
opacity={widget?.opacity}
|
||||||
title={' '}
|
title={' '}
|
||||||
name={name}
|
name={name}
|
||||||
yAxisUnit={yAxisUnit}
|
yAxisUnit={yAxisUnit}
|
||||||
|
@ -124,8 +124,7 @@ function GridGraph(props: Props): JSX.Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
}, [dispatch, isAddWidget, layouts, selectedDashboard, widgets]);
|
||||||
}, []);
|
|
||||||
|
|
||||||
const { featureResponse } = useSelector<AppState, AppReducer>(
|
const { featureResponse } = useSelector<AppState, AppReducer>(
|
||||||
(state) => state.app,
|
(state) => state.app,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user