mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 16:05:55 +08:00
Failing query range request due to top level operation dependency (#3182)
* fix: dependency check for top level operation * refactor: one on one mapping * fix: removed the unwanted if checks --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
parent
c4ce057d7a
commit
ace2d8a3b3
@ -60,6 +60,7 @@ function GridCardGraph({
|
|||||||
allowDelete,
|
allowDelete,
|
||||||
allowClone,
|
allowClone,
|
||||||
allowEdit,
|
allowEdit,
|
||||||
|
isQueryEnabled,
|
||||||
}: GridCardGraphProps): JSX.Element {
|
}: GridCardGraphProps): JSX.Element {
|
||||||
const { ref: graphRef, inView: isGraphVisible } = useInView({
|
const { ref: graphRef, inView: isGraphVisible } = useInView({
|
||||||
threshold: 0,
|
threshold: 0,
|
||||||
@ -115,7 +116,7 @@ function GridCardGraph({
|
|||||||
variables,
|
variables,
|
||||||
],
|
],
|
||||||
keepPreviousData: true,
|
keepPreviousData: true,
|
||||||
enabled: isGraphVisible && !isEmptyWidget,
|
enabled: isGraphVisible && !isEmptyWidget && isQueryEnabled,
|
||||||
refetchOnMount: false,
|
refetchOnMount: false,
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
setErrorMessage(error.message);
|
setErrorMessage(error.message);
|
||||||
@ -287,7 +288,7 @@ function GridCardGraph({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevChartDataSetRef?.labels === undefined && queryResponse.isLoading) {
|
if (queryResponse.status === 'loading' || queryResponse.status === 'idle') {
|
||||||
return (
|
return (
|
||||||
<span ref={graphRef}>
|
<span ref={graphRef}>
|
||||||
{!isEmpty(widget) && prevChartDataSetRef?.labels ? (
|
{!isEmpty(widget) && prevChartDataSetRef?.labels ? (
|
||||||
@ -399,6 +400,7 @@ interface GridCardGraphProps extends DispatchProps {
|
|||||||
allowDelete?: boolean;
|
allowDelete?: boolean;
|
||||||
allowClone?: boolean;
|
allowClone?: boolean;
|
||||||
allowEdit?: boolean;
|
allowEdit?: boolean;
|
||||||
|
isQueryEnabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
GridCardGraph.defaultProps = {
|
GridCardGraph.defaultProps = {
|
||||||
@ -407,6 +409,7 @@ GridCardGraph.defaultProps = {
|
|||||||
allowDelete: true,
|
allowDelete: true,
|
||||||
allowClone: true,
|
allowClone: true,
|
||||||
allowEdit: true,
|
allowEdit: true,
|
||||||
|
isQueryEnabled: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = (
|
const mapDispatchToProps = (
|
||||||
|
@ -49,6 +49,8 @@ function ServiceOverview({
|
|||||||
[servicename, tagFilterItems, isSpanMetricEnable, topLevelOperationsRoute],
|
[servicename, tagFilterItems, isSpanMetricEnable, topLevelOperationsRoute],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const isQueryEnabled = topLevelOperationsRoute.length > 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
@ -74,6 +76,7 @@ function ServiceOverview({
|
|||||||
allowClone={false}
|
allowClone={false}
|
||||||
allowDelete={false}
|
allowDelete={false}
|
||||||
allowEdit={false}
|
allowEdit={false}
|
||||||
|
isQueryEnabled={isQueryEnabled}
|
||||||
/>
|
/>
|
||||||
</GraphContainer>
|
</GraphContainer>
|
||||||
</Card>
|
</Card>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user