未验证 提交 193bda8d 编写于 作者: E EBIBO 提交者: GitHub

[JENKINS-70438] Newer build displayed when filtering the builds in Build...

[JENKINS-70438] Newer build displayed when filtering the builds in Build History Widget even if the build name didn't match (#7589)
Co-authored-by: NAlexander Brandes <mc.cache@web.de>
上级 3ca28803
......@@ -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);
......@@ -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
);
}
......@@ -500,7 +500,7 @@ function loadPage(params, focusOnSearch) {
updatePageParams(newDataTable);
togglePageUpDown();
if (!hasPageUp()) {
createRefreshTimeout();
createRefreshTimeout(params);
}
if (focusOnSearch) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册