mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-16 20:35:57 +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 { omitBy } from 'lodash-es';
|
||||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||||
import { PayloadProps, Props } from 'types/api/trace/getTagFilters';
|
import { PayloadProps, Props } from 'types/api/trace/getTagFilters';
|
||||||
|
import { TraceFilterEnum } from 'types/reducer/trace';
|
||||||
|
|
||||||
const getTagFilters = async (
|
const getTagFilters = async (
|
||||||
props: Props,
|
props: Props,
|
||||||
@ -12,6 +13,14 @@ const getTagFilters = async (
|
|||||||
const duration =
|
const duration =
|
||||||
omitBy(props.other, (_, key) => !key.startsWith('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) =>
|
const nonDuration = omitBy(props.other, (_, key) =>
|
||||||
key.startsWith('duration'),
|
key.startsWith('duration'),
|
||||||
);
|
);
|
||||||
@ -22,6 +31,7 @@ const getTagFilters = async (
|
|||||||
...nonDuration,
|
...nonDuration,
|
||||||
maxDuration: String((duration.duration || [])[0] || ''),
|
maxDuration: String((duration.duration || [])[0] || ''),
|
||||||
minDuration: String((duration.duration || [])[1] || ''),
|
minDuration: String((duration.duration || [])[1] || ''),
|
||||||
|
exclude,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -27,6 +27,7 @@ function TagsKey(props: TagsKeysProps): JSX.Element {
|
|||||||
start: globalTime.minTime,
|
start: globalTime.minTime,
|
||||||
end: globalTime.maxTime,
|
end: globalTime.maxTime,
|
||||||
other: Object.fromEntries(traces.selectedFilter),
|
other: Object.fromEntries(traces.selectedFilter),
|
||||||
|
isFilterExclude: traces.isFilterExclude,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.statusCode === 200) {
|
if (response.statusCode === 200) {
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
|
import { TraceReducer } from 'types/reducer/trace';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
start: number;
|
start: number;
|
||||||
end: number;
|
end: number;
|
||||||
other: {
|
other: {
|
||||||
[k: string]: string[];
|
[k: string]: string[];
|
||||||
};
|
};
|
||||||
|
isFilterExclude: TraceReducer['isFilterExclude'];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TagsKeys {
|
interface TagsKeys {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user