Skip to content

Commit

Permalink
[JENKINS-70438] Newer build displayed when filtering the builds in Bu…
Browse files Browse the repository at this point in the history
…ild History Widget even if the build name didn't match (#7589)

Co-authored-by: Alexander Brandes <[email protected]>
  • Loading branch information
benebsiny and NotMyFault authored Feb 14, 2023
1 parent 3ca2880 commit 193bda8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions war/src/main/js/filter-build-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const pageDown = buildHistoryPageNav.querySelectorAll(".pageDown")[0];
const leftRightPadding = 4;
const updateBuildsRefreshInterval = 5000;

function updateBuilds() {
function updateBuilds(params) {
if (isPageVisible()) {
new Ajax.Request(ajaxUrl, {
new Ajax.Request(ajaxUrl + toQueryString(params), {
requestHeaders: buildHistoryContainer.headers,
onSuccess: function (rsp) {
var dataTable = getDataTable(buildHistoryContainer);
Expand Down Expand Up @@ -82,19 +82,19 @@ function updateBuilds() {
// next update
buildHistoryContainer.headers = ["n", rsp.getResponseHeader("n")];
checkAllRowCellOverflows();
createRefreshTimeout();
createRefreshTimeout(params);
},
});
} else {
createRefreshTimeout();
createRefreshTimeout(params);
}
}

var buildRefreshTimeout;
function createRefreshTimeout() {
function createRefreshTimeout(params) {
cancelRefreshTimeout();
buildRefreshTimeout = window.setTimeout(
updateBuilds,
() => updateBuilds(params),
updateBuildsRefreshInterval
);
}
Expand Down Expand Up @@ -500,7 +500,7 @@ function loadPage(params, focusOnSearch) {
updatePageParams(newDataTable);
togglePageUpDown();
if (!hasPageUp()) {
createRefreshTimeout();
createRefreshTimeout(params);
}

if (focusOnSearch) {
Expand Down

0 comments on commit 193bda8

Please sign in to comment.