mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 20:59:02 +08:00
fix: added a filter on initial log fetch based on activelogid param
This commit is contained in:
parent
3661fd878e
commit
2e585acc78
@ -46,7 +46,7 @@ export const RawLogViewContainer = styled(Row)<{
|
|||||||
${({ $isHightlightedLog, $isDarkMode }): string =>
|
${({ $isHightlightedLog, $isDarkMode }): string =>
|
||||||
$isHightlightedLog
|
$isHightlightedLog
|
||||||
? `background-color: ${
|
? `background-color: ${
|
||||||
$isDarkMode ? Color.BG_SLATE_500 : Color.BG_VANILLA_300
|
$isDarkMode ? Color.BG_ROBIN_600 : Color.BG_VANILLA_400
|
||||||
};
|
};
|
||||||
transition: background-color 2s ease-in;`
|
transition: background-color 2s ease-in;`
|
||||||
: ''}
|
: ''}
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
initialFilters,
|
initialFilters,
|
||||||
initialQueriesMap,
|
initialQueriesMap,
|
||||||
initialQueryBuilderFormValues,
|
initialQueryBuilderFormValues,
|
||||||
|
OPERATORS,
|
||||||
PANEL_TYPES,
|
PANEL_TYPES,
|
||||||
} from 'constants/queryBuilder';
|
} from 'constants/queryBuilder';
|
||||||
import { DEFAULT_PER_PAGE_VALUE } from 'container/Controls/config';
|
import { DEFAULT_PER_PAGE_VALUE } from 'container/Controls/config';
|
||||||
@ -313,6 +314,29 @@ function LogsExplorerViews({
|
|||||||
pageSize: params.pageSize,
|
pageSize: params.pageSize,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add filter for activeLogId if present
|
||||||
|
let updatedFilters = paginateData.filters;
|
||||||
|
if (activeLogId) {
|
||||||
|
updatedFilters = {
|
||||||
|
...paginateData.filters,
|
||||||
|
items: [
|
||||||
|
...(paginateData.filters?.items || []),
|
||||||
|
{
|
||||||
|
id: v4(),
|
||||||
|
key: {
|
||||||
|
key: 'id',
|
||||||
|
type: '',
|
||||||
|
dataType: DataTypes.String,
|
||||||
|
isColumn: true,
|
||||||
|
},
|
||||||
|
op: OPERATORS['<='],
|
||||||
|
value: activeLogId,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
op: 'AND',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const queryData: IBuilderQuery[] =
|
const queryData: IBuilderQuery[] =
|
||||||
query.builder.queryData.length > 1
|
query.builder.queryData.length > 1
|
||||||
? query.builder.queryData
|
? query.builder.queryData
|
||||||
@ -320,6 +344,7 @@ function LogsExplorerViews({
|
|||||||
{
|
{
|
||||||
...(listQuery || initialQueryBuilderFormValues),
|
...(listQuery || initialQueryBuilderFormValues),
|
||||||
...paginateData,
|
...paginateData,
|
||||||
|
...(updatedFilters ? { filters: updatedFilters } : {}),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -333,7 +358,7 @@ function LogsExplorerViews({
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
[orderByTimestamp, listQuery],
|
[orderByTimestamp, listQuery, activeLogId],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleEndReached = useCallback(
|
const handleEndReached = useCallback(
|
||||||
|
@ -1 +1 @@
|
|||||||
export const HIGHLIGHTED_DELAY = 10000;
|
export const HIGHLIGHTED_DELAY = 120000;
|
||||||
|
@ -39,7 +39,7 @@ export const getActiveLogBackground = (
|
|||||||
return `background-color: ${Color.BG_SLATE_200} !important;`;
|
return `background-color: ${Color.BG_SLATE_200} !important;`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return `background-color: ${Color.BG_VANILLA_300}!important; color: ${Color.TEXT_SLATE_400} !important;`;
|
return `background-color: ${Color.BG_VANILLA_400}!important; color: ${Color.TEXT_SLATE_400} !important;`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getHightLightedLogBackground = (
|
export const getHightLightedLogBackground = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user