Skip to content

Commit b62a37f

Browse files
authored
change log window from 1 day to 6 hours (#4346)
1 parent 396fd4c commit b62a37f

File tree

1 file changed

+4
-4
lines changed
  • dashboard/src/main/home/cluster-dashboard/expanded-chart/logs-section

1 file changed

+4
-4
lines changed

dashboard/src/main/home/cluster-dashboard/expanded-chart/logs-section/useAgentLogs.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ export const useLogs = (
298298
flushLogsBuffer(true);
299299
const websocketKey = `${currentPod}-${namespace}-websocket`;
300300
const endDate = dayjs(setDate);
301-
const oneDayAgo = endDate.subtract(1, "day");
301+
const sixHoursAgo = endDate.subtract(6, "hour");
302302

303303
const { logs: initialLogs, previousCursor, nextCursor } = await queryLogs(
304-
oneDayAgo.toISOString(),
304+
sixHoursAgo.toISOString(),
305305
endDate.toISOString(),
306306
Direction.backward
307307
);
@@ -335,10 +335,10 @@ export const useLogs = (
335335
// we query by setting the endDate equal to the previous startDate, and setting the direction
336336
// to "backward"
337337
const refDate = paginationInfo.previousCursor ?? dayjs().toISOString();
338-
const oneDayAgo = dayjs(refDate).subtract(1, "day");
338+
const sixHoursAgo = dayjs(refDate).subtract(6, "hour");
339339

340340
const { logs: newLogs, previousCursor } = await queryLogs(
341-
oneDayAgo.toISOString(),
341+
sixHoursAgo.toISOString(),
342342
refDate,
343343
Direction.backward
344344
);

0 commit comments

Comments
 (0)