From 539f905e4280ccb4c9be72cd5e8d01c1234755b5 Mon Sep 17 00:00:00 2001 From: Markus Winter Date: Tue, 13 Aug 2024 01:43:28 +0200 Subject: [PATCH] [JENKINS-73592] refresh buildhistory widget when page gets focus --- war/src/main/js/pages/project/builds-card.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/war/src/main/js/pages/project/builds-card.js b/war/src/main/js/pages/project/builds-card.js index bea375d337d8..5f2e5341e98c 100644 --- a/war/src/main/js/pages/project/builds-card.js +++ b/war/src/main/js/pages/project/builds-card.js @@ -30,6 +30,9 @@ function load(options = {}) { // Avoid fetching if the page isn't active if (document.hidden) { + if (buildHistoryPage.dataset.pageHasUp === "false") { + createRefreshTimeout(); + } return; } @@ -101,6 +104,7 @@ function updateCardControls(parameters) { buildHistoryPage.dataset.pageEntryNewest = parameters.pageEntryNewest; buildHistoryPage.dataset.pageEntryOldest = parameters.pageEntryOldest; + buildHistoryPage.dataset.pageHasUp = parameters.pageHasUp; } paginationPrevious.addEventListener("click", () => {