|
@@ -213,6 +213,10 @@ export const useLogs = (
|
|
|
res.data.logs?.filter(Boolean).map((logLine: any) => logLine.line)
|
|
res.data.logs?.filter(Boolean).map((logLine: any) => logLine.line)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ if (direction === Direction.backward) {
|
|
|
|
|
+ newLogs.reverse();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
logs: newLogs,
|
|
logs: newLogs,
|
|
|
previousCursor: res.data.backward_continue_time,
|
|
previousCursor: res.data.backward_continue_time,
|
|
@@ -235,7 +239,7 @@ export const useLogs = (
|
|
|
const { logs: initialLogs, previousCursor, nextCursor } = await queryLogs(
|
|
const { logs: initialLogs, previousCursor, nextCursor } = await queryLogs(
|
|
|
twoWeeksAgo.toISOString(),
|
|
twoWeeksAgo.toISOString(),
|
|
|
endDate.toISOString(),
|
|
endDate.toISOString(),
|
|
|
- Direction.forward
|
|
|
|
|
|
|
+ Direction.backward
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
setPaginationInfo({
|
|
setPaginationInfo({
|