Merge branch '18368-notification-banner' into main
[arvados.git] / src / store / process-logs-panel / process-logs-panel-actions.ts
index e0f5a14e2e716361f30e8855f3c99265dff8eed2..16177f18a62edaba2db7ee12f75e921dd6ebe946 100644 (file)
@@ -87,8 +87,8 @@ const loadContainerLogs = async (containerUuid: string, logService: LogService,
         order: requestOrderAsc,
     });
 
-    // Request the remaining, or the last 'maxPageSize' logs if necessary
-    const remainingLogs = itemsAvailable - maxPageSize;
+    // Request additional logs if necessary
+    const remainingLogs = itemsAvailable - items.length;
     if (remainingLogs > 0) {
         const { items: itemsLast } = await logService.list({
             limit: min([maxPageSize, remainingLogs]),
@@ -96,7 +96,7 @@ const loadContainerLogs = async (containerUuid: string, logService: LogService,
             order: requestOrderDesc,
             count: 'none',
         })
-        if (remainingLogs > maxPageSize) {
+        if (remainingLogs - itemsLast.length > 0) {
             const snipLine = {
                 ...items[items.length - 1],
                 eventType: LogEventType.SNIP,