From 1fae3534a199ead71b39319781d1094514a7c6b2 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Thu, 17 Oct 2019 15:52:13 -0400 Subject: [PATCH] Get the last two pages of events on page load When the page loads, we want to retrieve and initially display enough content for the scrollbar to show. If the very last page doesn't have enough content for the scrollbar to show, the user won't be able to scroll up to see more job history. To avoid this scenario, we always fetch the last _two_ pages when loading the view. --- awx/ui/client/features/output/index.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/features/output/index.controller.js b/awx/ui/client/features/output/index.controller.js index 07124d8bd9..7f171f728a 100644 --- a/awx/ui/client/features/output/index.controller.js +++ b/awx/ui/client/features/output/index.controller.js @@ -392,7 +392,8 @@ function last () { return lastPage(); } - return lastRange(); + return lastRange() + .then(() => previousRange()); } function next () {