Skip to content

Commit

Permalink
Update filter-build-history.js
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jan 14, 2024
1 parent 0b4a5dd commit 347e966
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion war/src/main/js/filter-build-history.js
@@ -1,7 +1,9 @@
import debounce from "lodash/debounce";

const buildHistoryPage = document.getElementById("buildHistoryPage");
const pageSearchInput = buildHistoryPage.querySelector(
const pageSearch = buildHistoryPage.querySelector(
".jenkins-search",
);const pageSearchInput = buildHistoryPage.querySelector(
"input",
);
const ajaxUrl = buildHistoryPage.getAttribute("page-ajax");
Expand All @@ -21,6 +23,7 @@ function loadPage() {
if (rsp.ok) {
rsp.text().then((responseText) => {
container.classList.remove("app-builds-container--loading");
pageSearch.classList.remove("jenkins-search--loading");

if (responseText.trim() === "") {
contents.innerHTML = "";
Expand Down Expand Up @@ -57,6 +60,7 @@ setInterval(() => {
document.addEventListener("DOMContentLoaded", function () {
pageSearchInput.addEventListener("input", function () {
container.classList.add("app-builds-container--loading");
pageSearch.classList.add("jenkins-search--loading");
debouncedFilter();
});

Expand Down

0 comments on commit 347e966

Please sign in to comment.