mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 20:35:56 +08:00
fix: getting first staged query (#3282)
* fix: getting first staged query * fix: getting first enabled query --------- Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
parent
c6ac8df707
commit
37349786f1
@ -463,9 +463,17 @@ function LogsExplorerViews(): JSX.Element {
|
||||
(queryData) => queryData.groupBy.length > 0,
|
||||
);
|
||||
|
||||
return isGroupByExist
|
||||
? data.payload.data.result
|
||||
: [data.payload.data.result[0]];
|
||||
const firstEnabledQuery = stagedQuery.builder.queryData.find(
|
||||
(item) => !item.disabled,
|
||||
);
|
||||
|
||||
const firstPayloadQuery = data.payload.data.result.find(
|
||||
(item) => item.queryName === firstEnabledQuery?.queryName,
|
||||
);
|
||||
|
||||
const firstPayloadQueryArray = firstPayloadQuery ? [firstPayloadQuery] : [];
|
||||
|
||||
return isGroupByExist ? data.payload.data.result : firstPayloadQueryArray;
|
||||
}, [stagedQuery, data, panelType, listChartData]);
|
||||
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user