mirror of https://github.com/portainer/portainer
fix(activitylog): remove export limit and fix search function [BE-12270] (#1232)
parent
68b9fef3f0
commit
19e1cc2fbd
|
@ -25,7 +25,7 @@ export function ActivityLogsView() {
|
||||||
limit: tableState.pageSize,
|
limit: tableState.pageSize,
|
||||||
sortBy: getSortType(tableState.sortBy?.id),
|
sortBy: getSortType(tableState.sortBy?.id),
|
||||||
sortDesc: tableState.sortBy?.desc,
|
sortDesc: tableState.sortBy?.desc,
|
||||||
search: tableState.search,
|
keyword: tableState.search,
|
||||||
...(range
|
...(range
|
||||||
? {
|
? {
|
||||||
after: seconds(range?.start?.valueOf()),
|
after: seconds(range?.start?.valueOf()),
|
||||||
|
|
|
@ -20,7 +20,7 @@ export interface Query {
|
||||||
limit: number;
|
limit: number;
|
||||||
sortBy?: SortKey;
|
sortBy?: SortKey;
|
||||||
sortDesc?: boolean;
|
sortDesc?: boolean;
|
||||||
search: string;
|
keyword: string;
|
||||||
after?: number;
|
after?: number;
|
||||||
before?: number;
|
before?: number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ export function useExportMutation() {
|
||||||
async function exportActivityLogs(query: Omit<Query, 'limit'>) {
|
async function exportActivityLogs(query: Omit<Query, 'limit'>) {
|
||||||
try {
|
try {
|
||||||
const { data, headers } = await axios.get<Blob>('/useractivity/logs.csv', {
|
const { data, headers } = await axios.get<Blob>('/useractivity/logs.csv', {
|
||||||
params: { ...query, limit: 2000 },
|
params: { ...query, limit: 0 },
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'text/csv',
|
'Content-type': 'text/csv',
|
||||||
|
|
Loading…
Reference in New Issue