mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 20:59:02 +08:00
fix: increased debounce to 1000 (from 500). also reduced networkcalls in getquery range (#1423)
This commit is contained in:
parent
1b6597b974
commit
475c44a000
@ -66,8 +66,12 @@ function ChartPreview({
|
|||||||
}),
|
}),
|
||||||
enabled:
|
enabled:
|
||||||
query != null &&
|
query != null &&
|
||||||
(query.queryType !== EQueryType.PROM ||
|
((query.queryType === EQueryType.PROM &&
|
||||||
(query.promQL?.length > 0 && query.promQL[0].query !== '')),
|
query.promQL?.length > 0 &&
|
||||||
|
query.promQL[0].query !== '') ||
|
||||||
|
(query.queryType === EQueryType.QUERY_BUILDER &&
|
||||||
|
query.metricsBuilder?.queryBuilder?.length > 0 &&
|
||||||
|
query.metricsBuilder?.queryBuilder[0].metricName !== '')),
|
||||||
});
|
});
|
||||||
|
|
||||||
const chartDataSet = queryResponse.isError
|
const chartDataSet = queryResponse.isError
|
||||||
|
@ -83,7 +83,7 @@ function FormAlertRules({
|
|||||||
|
|
||||||
// staged query is used to display chart preview
|
// staged query is used to display chart preview
|
||||||
const [stagedQuery, setStagedQuery] = useState<StagedQuery>();
|
const [stagedQuery, setStagedQuery] = useState<StagedQuery>();
|
||||||
const debouncedStagedQuery = useDebounce(stagedQuery, 500);
|
const debouncedStagedQuery = useDebounce(stagedQuery, 1000);
|
||||||
|
|
||||||
// this use effect initiates staged query and
|
// this use effect initiates staged query and
|
||||||
// other queries based on server data.
|
// other queries based on server data.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user