mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 13:39:00 +08:00
fix: do not add select columns when the datasource is logs (#5515)
* fix: do not add select columns when the datasource is logs * chore: added data test id
This commit is contained in:
parent
89fd3e4f55
commit
b08e859426
@ -125,10 +125,9 @@ function GridCardGraph({
|
|||||||
offset: 0,
|
offset: 0,
|
||||||
limit: updatedQuery.builder.queryData[0].limit || 0,
|
limit: updatedQuery.builder.queryData[0].limit || 0,
|
||||||
},
|
},
|
||||||
|
// we do not need select columns in case of logs
|
||||||
selectColumns:
|
selectColumns:
|
||||||
initialDataSource === DataSource.LOGS
|
initialDataSource === DataSource.TRACES && widget.selectedTracesFields,
|
||||||
? widget.selectedLogFields
|
|
||||||
: widget.selectedTracesFields,
|
|
||||||
},
|
},
|
||||||
fillGaps: widget.fillSpans,
|
fillGaps: widget.fillSpans,
|
||||||
};
|
};
|
||||||
|
@ -309,6 +309,7 @@ function ExplorerColumnsRenderer({
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
className="action-btn"
|
className="action-btn"
|
||||||
|
data-testid="add-columns-button"
|
||||||
icon={
|
icon={
|
||||||
<PlusCircle
|
<PlusCircle
|
||||||
size={16}
|
size={16}
|
||||||
|
@ -563,11 +563,11 @@ function NewWidget({ selectedGraph }: NewWidgetProps): JSX.Element {
|
|||||||
if (selectedGraph === PANEL_TYPES.LIST) {
|
if (selectedGraph === PANEL_TYPES.LIST) {
|
||||||
const initialDataSource = currentQuery.builder.queryData[0].dataSource;
|
const initialDataSource = currentQuery.builder.queryData[0].dataSource;
|
||||||
if (initialDataSource === DataSource.LOGS) {
|
if (initialDataSource === DataSource.LOGS) {
|
||||||
|
// we do not need selected log columns in the request data as the entire response contains all the necessary data
|
||||||
setRequestData((prev) => ({
|
setRequestData((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
tableParams: {
|
tableParams: {
|
||||||
...prev.tableParams,
|
...prev.tableParams,
|
||||||
selectColumns: selectedLogFields,
|
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
} else if (initialDataSource === DataSource.TRACES) {
|
} else if (initialDataSource === DataSource.TRACES) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user