mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 13:25:54 +08:00
bug: exclude param is added in the getTagFilters (#1025)
This commit is contained in:
parent
59f32884d2
commit
9351fd09c2
@ -4,6 +4,7 @@ import { AxiosError } from 'axios';
|
||||
import { omitBy } from 'lodash-es';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/trace/getTagFilters';
|
||||
import { TraceFilterEnum } from 'types/reducer/trace';
|
||||
|
||||
const getTagFilters = async (
|
||||
props: Props,
|
||||
@ -12,6 +13,14 @@ const getTagFilters = async (
|
||||
const duration =
|
||||
omitBy(props.other, (_, key) => !key.startsWith('duration')) || [];
|
||||
|
||||
const exclude: TraceFilterEnum[] = [];
|
||||
|
||||
props.isFilterExclude.forEach((value, key) => {
|
||||
if (value) {
|
||||
exclude.push(key);
|
||||
}
|
||||
});
|
||||
|
||||
const nonDuration = omitBy(props.other, (_, key) =>
|
||||
key.startsWith('duration'),
|
||||
);
|
||||
@ -22,6 +31,7 @@ const getTagFilters = async (
|
||||
...nonDuration,
|
||||
maxDuration: String((duration.duration || [])[0] || ''),
|
||||
minDuration: String((duration.duration || [])[1] || ''),
|
||||
exclude,
|
||||
});
|
||||
|
||||
return {
|
||||
|
@ -27,6 +27,7 @@ function TagsKey(props: TagsKeysProps): JSX.Element {
|
||||
start: globalTime.minTime,
|
||||
end: globalTime.maxTime,
|
||||
other: Object.fromEntries(traces.selectedFilter),
|
||||
isFilterExclude: traces.isFilterExclude,
|
||||
});
|
||||
|
||||
if (response.statusCode === 200) {
|
||||
|
@ -1,9 +1,12 @@
|
||||
import { TraceReducer } from 'types/reducer/trace';
|
||||
|
||||
export interface Props {
|
||||
start: number;
|
||||
end: number;
|
||||
other: {
|
||||
[k: string]: string[];
|
||||
};
|
||||
isFilterExclude: TraceReducer['isFilterExclude'];
|
||||
}
|
||||
|
||||
interface TagsKeys {
|
||||
|
Loading…
x
Reference in New Issue
Block a user