Skip to content

Commit

Permalink
[JENKINS-73592] refresh buildhistory widget when page gets focus
Browse files Browse the repository at this point in the history
  • Loading branch information
mawinter69 committed Aug 12, 2024
1 parent 2c3d25c commit 539f905
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions war/src/main/js/pages/project/builds-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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", () => {
Expand Down

0 comments on commit 539f905

Please sign in to comment.