mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 02:02:04 +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 { updateURL } from 'store/actions/trace/util';
|
||||||
import { AppState } from 'store/reducers';
|
import { AppState } from 'store/reducers';
|
||||||
import AppActions from 'types/actions';
|
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';
|
import { TraceReducer } from 'types/reducer/trace';
|
||||||
|
|
||||||
dayjs.extend(duration);
|
dayjs.extend(duration);
|
||||||
@ -136,6 +139,13 @@ function TraceTable(): JSX.Element {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dispatch({
|
||||||
|
type: UPDATE_SPANS_AGGREGATE_PAGE_NUMBER,
|
||||||
|
payload: {
|
||||||
|
currentPage: props.current,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
updateURL(
|
updateURL(
|
||||||
selectedFilter,
|
selectedFilter,
|
||||||
filterToFetchData,
|
filterToFetchData,
|
||||||
|
@ -11,6 +11,7 @@ import {
|
|||||||
UPDATE_SELECTED_TAGS,
|
UPDATE_SELECTED_TAGS,
|
||||||
UPDATE_SPAN_ORDER,
|
UPDATE_SPAN_ORDER,
|
||||||
UPDATE_SPANS_AGGREGATE,
|
UPDATE_SPANS_AGGREGATE,
|
||||||
|
UPDATE_SPANS_AGGREGATE_PAGE_NUMBER,
|
||||||
UPDATE_TAG_MODAL_VISIBILITY,
|
UPDATE_TAG_MODAL_VISIBILITY,
|
||||||
UPDATE_TRACE_FILTER,
|
UPDATE_TRACE_FILTER,
|
||||||
UPDATE_TRACE_FILTER_LOADING,
|
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:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,8 @@ export const UPDATE_FILTER_RESPONSE_SELECTED =
|
|||||||
export const UPDATE_FILTER_EXCLUDE = 'UPDATE_FILTER_EXCLUDE';
|
export const UPDATE_FILTER_EXCLUDE = 'UPDATE_FILTER_EXCLUDE';
|
||||||
|
|
||||||
export const UPDATE_SPAN_ORDER = 'UPDATE_SPAN_ORDER';
|
export const UPDATE_SPAN_ORDER = 'UPDATE_SPAN_ORDER';
|
||||||
|
export const UPDATE_SPANS_AGGREGATE_PAGE_NUMBER =
|
||||||
|
'UPDATE_SPANS_AGGREGATE_PAGE_NUMBER';
|
||||||
|
|
||||||
export interface UpdateFilter {
|
export interface UpdateFilter {
|
||||||
type: typeof UPDATE_TRACE_FILTER;
|
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 {
|
export interface UpdateSpanOrder {
|
||||||
type: typeof UPDATE_SPAN_ORDER;
|
type: typeof UPDATE_SPAN_ORDER;
|
||||||
payload: {
|
payload: {
|
||||||
@ -177,4 +186,5 @@ export type TraceActions =
|
|||||||
| ResetTraceFilter
|
| ResetTraceFilter
|
||||||
| UpdateSelected
|
| UpdateSelected
|
||||||
| UpdateFilterExclude
|
| UpdateFilterExclude
|
||||||
| UpdateSpanOrder;
|
| UpdateSpanOrder
|
||||||
|
| UpdateSpansAggregatePageNumber;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user