mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 02:12:02 +08:00
bug: current page is updated in redux to see the updated values
This commit is contained in:
parent
8809105a8d
commit
d72dacdc1f
@ -10,7 +10,10 @@ import { Dispatch } from 'redux';
|
||||
import { updateURL } from 'store/actions/trace/util';
|
||||
import { AppState } from 'store/reducers';
|
||||
import AppActions from 'types/actions';
|
||||
import { UPDATE_SPAN_ORDER } from 'types/actions/trace';
|
||||
import {
|
||||
UPDATE_SPAN_ORDER,
|
||||
UPDATE_SPANS_AGGREGATE_PAGE_NUMBER,
|
||||
} from 'types/actions/trace';
|
||||
import { TraceReducer } from 'types/reducer/trace';
|
||||
|
||||
dayjs.extend(duration);
|
||||
@ -136,6 +139,13 @@ function TraceTable(): JSX.Element {
|
||||
},
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: UPDATE_SPANS_AGGREGATE_PAGE_NUMBER,
|
||||
payload: {
|
||||
currentPage: props.current,
|
||||
},
|
||||
});
|
||||
|
||||
updateURL(
|
||||
selectedFilter,
|
||||
filterToFetchData,
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
UPDATE_SELECTED_TAGS,
|
||||
UPDATE_SPAN_ORDER,
|
||||
UPDATE_SPANS_AGGREGATE,
|
||||
UPDATE_SPANS_AGGREGATE_PAGE_NUMBER,
|
||||
UPDATE_TAG_MODAL_VISIBILITY,
|
||||
UPDATE_TRACE_FILTER,
|
||||
UPDATE_TRACE_FILTER_LOADING,
|
||||
@ -213,6 +214,16 @@ const traceReducer = (
|
||||
};
|
||||
}
|
||||
|
||||
case UPDATE_SPANS_AGGREGATE_PAGE_NUMBER: {
|
||||
return {
|
||||
...state,
|
||||
spansAggregate: {
|
||||
...state.spansAggregate,
|
||||
currentPage: action.payload.currentPage,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ export const UPDATE_FILTER_RESPONSE_SELECTED =
|
||||
export const UPDATE_FILTER_EXCLUDE = 'UPDATE_FILTER_EXCLUDE';
|
||||
|
||||
export const UPDATE_SPAN_ORDER = 'UPDATE_SPAN_ORDER';
|
||||
export const UPDATE_SPANS_AGGREGATE_PAGE_NUMBER =
|
||||
'UPDATE_SPANS_AGGREGATE_PAGE_NUMBER';
|
||||
|
||||
export interface UpdateFilter {
|
||||
type: typeof UPDATE_TRACE_FILTER;
|
||||
@ -152,6 +154,13 @@ export interface UpdateSpans {
|
||||
};
|
||||
}
|
||||
|
||||
export interface UpdateSpansAggregatePageNumber {
|
||||
type: typeof UPDATE_SPANS_AGGREGATE_PAGE_NUMBER;
|
||||
payload: {
|
||||
currentPage: TraceReducer['spansAggregate']['currentPage'];
|
||||
};
|
||||
}
|
||||
|
||||
export interface UpdateSpanOrder {
|
||||
type: typeof UPDATE_SPAN_ORDER;
|
||||
payload: {
|
||||
@ -177,4 +186,5 @@ export type TraceActions =
|
||||
| ResetTraceFilter
|
||||
| UpdateSelected
|
||||
| UpdateFilterExclude
|
||||
| UpdateSpanOrder;
|
||||
| UpdateSpanOrder
|
||||
| UpdateSpansAggregatePageNumber;
|
||||
|
Loading…
x
Reference in New Issue
Block a user