diff --git a/core/src/main/resources/hudson/PluginManager/_installed.js b/core/src/main/resources/hudson/PluginManager/_installed.js index 8e1f9c656033c..e3712b850818b 100644 --- a/core/src/main/resources/hudson/PluginManager/_installed.js +++ b/core/src/main/resources/hudson/PluginManager/_installed.js @@ -22,7 +22,7 @@ { method: "post", headers: crumb.wrap({}), - } + }, ).then((rsp) => { if (!rsp.ok) { rsp.text().then((responseText) => { @@ -38,7 +38,7 @@ let e = Array.from( document .getElementById("plugins") - .querySelectorAll("input[type='checkbox']") + .querySelectorAll("input[type='checkbox']"), ).find(function (e) { return String(e.checked) !== e.getAttribute("original"); }); diff --git a/core/src/main/resources/hudson/PluginManager/_table.js b/core/src/main/resources/hudson/PluginManager/_table.js index 6a001a4890326..5329cf32906b1 100644 --- a/core/src/main/resources/hudson/PluginManager/_table.js +++ b/core/src/main/resources/hudson/PluginManager/_table.js @@ -41,7 +41,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { } } var instructions = document.getElementById( - "hidden-by-default-instructions" + "hidden-by-default-instructions", ); if (instructions) { instructions.style.display = anyVisible ? "none" : ""; @@ -53,7 +53,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { (function () { var instructionsTd = document.getElementById( - "hidden-by-default-instructions-td" + "hidden-by-default-instructions-td", ); if (instructionsTd) { // only on Available tab @@ -377,19 +377,19 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { if (dependenciesDiv) { pluginTR.jenkinsPluginMetadata.dependencies = selectAll( "span", - dependenciesDiv + dependenciesDiv, ); pluginTR.jenkinsPluginMetadata.dependencyIds = processSpanSet( - pluginTR.jenkinsPluginMetadata.dependencies + pluginTR.jenkinsPluginMetadata.dependencies, ); } if (dependentsDiv) { pluginTR.jenkinsPluginMetadata.dependents = selectAll( "span", - dependentsDiv + dependentsDiv, ); pluginTR.jenkinsPluginMetadata.dependentIds = processSpanSet( - pluginTR.jenkinsPluginMetadata.dependents + pluginTR.jenkinsPluginMetadata.dependents, ); } @@ -467,7 +467,7 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) { window.addEventListener("load", function () { const compatibleCheckbox = document.querySelector( - "[data-select='compatible']" + "[data-select='compatible']", ); if (compatibleCheckbox) { compatibleCheckbox.addEventListener("click", () => { @@ -487,7 +487,7 @@ window.addEventListener("load", function () { if (updateCenterError) { notificationBar.show( updateCenterError.content.textContent, - notificationBar.ERROR + notificationBar.ERROR, ); } }); diff --git a/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js b/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js index edccad221f515..bd71b5fec8078 100644 --- a/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js +++ b/core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js @@ -9,6 +9,6 @@ detail.style.display = detail.style.display == "block" ? "none" : "block"; }); - } + }, ); })(); diff --git a/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js b/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js index fa020b9eb6e6a..2382b20894c69 100644 --- a/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js +++ b/core/src/main/resources/hudson/diagnosis/ReverseProxySetupMonitor/resources.js @@ -2,7 +2,7 @@ var redirectForm = document.getElementById("redirect-error"); if (!redirectForm) { console.warn( - 'This script expects to have an element with id="redirect-error" to be working.' + 'This script expects to have an element with id="redirect-error" to be working.', ); return; } diff --git a/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js b/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js index 4437c99d13dc4..941f5cc8d5bcd 100644 --- a/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js +++ b/core/src/main/resources/hudson/model/BuildTimelineWidget/build-timeline-widget.js @@ -20,7 +20,7 @@ function getData(eventSource1, current, min, max) { { method: "POST", headers: crumb.wrap({}), - } + }, ).then((t) => { if (t.ok) { t.json() @@ -129,6 +129,6 @@ if (window.addEventListener) { tl.layout(); }, null, - true + true, ); })(); diff --git a/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js b/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js index 4d78549beab7f..7fcfa705ff738 100644 --- a/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js +++ b/core/src/main/resources/hudson/model/Job/buildTimeTrend_resources.js @@ -109,20 +109,20 @@ function generateSVGIcon(iconName, iconSizeClass) { "href", imagesURL + "/build-status/build-status-sprite.svg#build-status-" + - (isInProgress ? "in-progress" : "static") + (isInProgress ? "in-progress" : "static"), ); svg1.appendChild(use1); const svg2 = document.createElementNS("http://www.w3.org/2000/svg", "svg"); svg2.setAttribute( "class", - "svg-icon icon-" + iconName + " " + (iconSizeClass || "icon-sm") + "svg-icon icon-" + iconName + " " + (iconSizeClass || "icon-sm"), ); svg2.setAttribute("viewBox", "0 0 24 24"); const use2 = document.createElementNS("http://www.w3.org/2000/svg", "use"); use2.setAttribute( "href", - imagesURL + "/build-status/build-status-sprite.svg#" + buildStatus + imagesURL + "/build-status/build-status-sprite.svg#" + buildStatus, ); svg2.appendChild(use2); @@ -174,7 +174,7 @@ window.displayBuilds = function (data) { "jenkins-table__link", "jenkins-table__badge", "model-link", - "inside" + "inside", ); a2.href = rootUrl + "/" + e.url; a2.textContent = e.displayName; @@ -190,7 +190,7 @@ window.displayBuilds = function (data) { "onclick", 'javascript:tl.getBand(0).scrollToCenter(Timeline.DateTime.parseGregorianDateTime("' + e.timestampString3 + - '"))' + '"))', ); button.textContent = e.timestampString; td3.appendChild(button); diff --git a/core/src/main/resources/hudson/model/LoadStatistics/resources.js b/core/src/main/resources/hudson/model/LoadStatistics/resources.js index e53560a45245b..2ffbf37ed892e 100644 --- a/core/src/main/resources/hudson/model/LoadStatistics/resources.js +++ b/core/src/main/resources/hudson/model/LoadStatistics/resources.js @@ -29,7 +29,7 @@ if (graphLocation) { const type = timespanSelect.value; const parentSelector = graphLocation.getAttribute( - "data-graph-parent-selector" + "data-graph-parent-selector", ); const baseUrl = graphLocation.getAttribute("data-graph-base-url"); const graphAlt = graphLocation.getAttribute("data-graph-alt"); diff --git a/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js b/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js index c7876c0c2b52a..2040aab6684ea 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js +++ b/core/src/main/resources/hudson/model/UpdateCenter/_download-failure.js @@ -12,5 +12,5 @@ Behaviour.specify( n.style.display = "block"; this.style.display = "none"; }; - } + }, ); diff --git a/core/src/main/resources/hudson/model/UpdateCenter/update-center.js b/core/src/main/resources/hudson/model/UpdateCenter/update-center.js index 379816a1d4598..aa426cb9adfaa 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/update-center.js +++ b/core/src/main/resources/hudson/model/UpdateCenter/update-center.js @@ -9,7 +9,7 @@ Behaviour.specify( crumb.appendToForm(form); form.submit(); }); - } + }, ); function refresh() { diff --git a/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js b/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js index 472a894ce61e6..80977933eaaa8 100644 --- a/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js +++ b/core/src/main/resources/hudson/views/BuildButtonColumn/icon.js @@ -16,5 +16,5 @@ Behaviour.specify( hoverNotification(message, this, -100); return false; }; - } + }, ); diff --git a/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js b/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js index 05ff9efc19fae..fda1897c03b11 100644 --- a/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js +++ b/core/src/main/resources/jenkins/diagnostics/URICheckEncodingMonitor/adjunct.js @@ -8,10 +8,10 @@ Behaviour.specify( fetch(url + "?" + params).then((rsp) => { rsp.text().then((responseText) => { var message = document.getElementById( - "URICheckEncodingMonitor-message" + "URICheckEncodingMonitor-message", ); message.innerHTML = responseText; }); }); - } + }, ); diff --git a/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js b/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js index 64808b5010987..40d800cea6fcd 100644 --- a/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js +++ b/core/src/main/resources/jenkins/install/SetupWizard/setInitialRootUrlFieldValue.js @@ -13,7 +13,7 @@ rootUrlField.onkeydown = function (event) { var iframeRelativeUrl = "setupWizard/setupWizardConfigureInstance"; var rootUrl = iframeUrl.substr( 0, - iframeUrl.length - iframeRelativeUrl.length + iframeUrl.length - iframeRelativeUrl.length, ); // to keep only the root url rootUrlField.value = rootUrl; diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js index 3167869377caa..7278b6021ddf6 100644 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.js @@ -87,19 +87,19 @@ document.getElementById("visible-am-container"), { closeAll: closeAll, - } + }, ); var securityMonitors = initializeAmMonitor( document.getElementById("visible-sec-am-container"), { closeAll: closeAll, - } + }, + ); + monitorWidgets = [normalMonitors, securityMonitors].filter( + function (widget) { + return widget !== null; + }, ); - monitorWidgets = [normalMonitors, securityMonitors].filter(function ( - widget - ) { - return widget !== null; - }); monitorWidgets.forEach(function (widget) { widget.startListeners(); diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js index 3ca3562e29694..47e4d6c1bed15 100644 --- a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js +++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js @@ -30,7 +30,7 @@ Behaviour.specify( event.preventDefault(); revokeToken(element); }); - } + }, ); Behaviour.specify( @@ -41,7 +41,7 @@ Behaviour.specify( element.addEventListener("click", function () { saveApiToken(element); }); - } + }, ); function revokeToken(anchorRevoke) { @@ -63,7 +63,7 @@ function revokeToken(anchorRevoke) { if (repeatedChunk.querySelectorAll(".legacy-token").length > 0) { // we are revoking the legacy token var messageIfLegacyRevoked = anchorRevoke.getAttribute( - "data-message-if-legacy-revoked" + "data-message-if-legacy-revoked", ); var legacyInput = document.getElementById("apiToken"); @@ -115,7 +115,7 @@ function saveApiToken(button) { // show the copy button var tokenCopyButton = repeatedChunk.querySelector( - ".jenkins-copy-button" + ".jenkins-copy-button", ); tokenCopyButton.setAttribute("text", tokenValue); tokenCopyButton.classList.remove("jenkins-hidden"); @@ -125,7 +125,7 @@ function saveApiToken(button) { uuidInput.value = tokenUuid; var warningMessage = repeatedChunk.querySelector( - ".display-after-generation" + ".display-after-generation", ); warningMessage.classList.add("visible"); @@ -133,7 +133,7 @@ function saveApiToken(button) { button.remove(); var revokeButton = repeatedChunk.querySelector( - ".api-token-property-token-revoke" + ".api-token-property-token-revoke", ); revokeButton.classList.remove("hidden-button"); @@ -154,7 +154,7 @@ function adjustTokenEmptyListMessage(tokenList) { // number of token that are already existing or freshly created var numOfToken = tokenList.querySelectorAll( - ".token-list-existing-item, .token-list-fresh-item" + ".token-list-existing-item, .token-list-fresh-item", ).length; if (numOfToken >= 1) { if (!emptyListMessage.classList.contains("hidden-message")) { diff --git a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js index 0b62f186b4657..fd43b0655a107 100644 --- a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js +++ b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js @@ -33,7 +33,7 @@ function selectFresh(anchor) { var parent = anchor.closest(".legacy-token-usage"); var allCheckBoxes = parent.querySelectorAll(".token-to-revoke"); var concernedCheckBoxes = parent.querySelectorAll( - ".token-to-revoke.fresh-token" + ".token-to-revoke.fresh-token", ); checkTheDesiredOne(allCheckBoxes, concernedCheckBoxes); @@ -43,7 +43,7 @@ function selectRecent(anchor) { var parent = anchor.closest(".legacy-token-usage"); var allCheckBoxes = parent.querySelectorAll(".token-to-revoke"); var concernedCheckBoxes = parent.querySelectorAll( - ".token-to-revoke.recent-token" + ".token-to-revoke.recent-token", ); checkTheDesiredOne(allCheckBoxes, concernedCheckBoxes); @@ -92,7 +92,7 @@ function confirmAndRevokeAllSelected(button) { var confirmMessageTemplate = button.getAttribute("data-confirm-template"); var confirmMessage = confirmMessageTemplate.replace( "%num%", - allCheckedCheckBoxes.length + allCheckedCheckBoxes.length, ); if (confirm(confirmMessage)) { var url = button.getAttribute("data-url"); diff --git a/core/src/main/resources/lib/form/advanced/advanced.js b/core/src/main/resources/lib/form/advanced/advanced.js index e8b257c15d5c4..d155f7ec7e5d9 100644 --- a/core/src/main/resources/lib/form/advanced/advanced.js +++ b/core/src/main/resources/lib/form/advanced/advanced.js @@ -37,7 +37,7 @@ Behaviour.specify( } const oneOrMoreFieldsEditedNotice = parentContainer.querySelector( - ".jenkins-edited-section-label" + ".jenkins-edited-section-label", ); if (oneOrMoreFieldsEditedNotice.classList.contains("jenkins-hidden")) { @@ -63,7 +63,7 @@ Behaviour.specify( JSON.stringify(Object.fromEntries(formData)); oneOrMoreFieldsEditedNotice.classList.toggle( "jenkins-hidden", - result + result, ); }); }); @@ -83,7 +83,7 @@ Behaviour.specify( layoutUpdateCallback.call(); }); e = null; // avoid memory leak - } + }, ); Behaviour.specify( @@ -99,5 +99,5 @@ Behaviour.specify( const customizedFields = element.getAttribute("data-customized-fields"); console.log("no element " + id + " for " + customizedFields); } - } + }, ); diff --git a/core/src/main/resources/lib/form/apply/apply.js b/core/src/main/resources/lib/form/apply/apply.js index acf3f868dd146..d67d9306173df 100644 --- a/core/src/main/resources/lib/form/apply/apply.js +++ b/core/src/main/resources/lib/form/apply/apply.js @@ -102,5 +102,5 @@ Behaviour.specify( f.target = "_self"; } }); - } + }, ); diff --git a/core/src/main/resources/lib/form/combobox/combobox.js b/core/src/main/resources/lib/form/combobox/combobox.js index 67fde93abaa28..12a4f90085f2b 100644 --- a/core/src/main/resources/lib/form/combobox/combobox.js +++ b/core/src/main/resources/lib/form/combobox/combobox.js @@ -15,7 +15,7 @@ Behaviour.specify("INPUT.combobox2", "combobox", 100, function (e) { } return candidates; }, - {} + {}, ); refillOnChange(e, function (params) { diff --git a/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js b/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js index 2ed84695367c5..5718de0656ebb 100644 --- a/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js +++ b/core/src/main/resources/lib/form/expandableTextbox/expandableTextbox.js @@ -48,5 +48,5 @@ Behaviour.specify( element.addEventListener("click", function () { expandTextArea(element); }); - } + }, ); diff --git a/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js b/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js index d19e867ce2189..142c6f1edb013 100644 --- a/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js +++ b/core/src/main/resources/lib/form/filter-menu-button/filter-menu-button.js @@ -2,7 +2,7 @@ window.createFilterMenuButton = function ( button, menu, menuAlignment, - menuMinScrollHeight + menuMinScrollHeight, ) { var MIN_NUM_OPTIONS = 5; var menuButton = new YAHOO.widget.Button(button, { @@ -39,7 +39,7 @@ function _createFilterMenuButton(menu) { filterInput.setAttribute("type", "search"); filterInput.addEventListener("input", (event) => - _applyFilterKeyword(menu, event.currentTarget) + _applyFilterKeyword(menu, event.currentTarget), ); filterInput.addEventListener("keypress", (event) => { if (event.key === "Enter") { diff --git a/core/src/main/resources/lib/form/hetero-list/hetero-list.js b/core/src/main/resources/lib/form/hetero-list/hetero-list.js index 7f4df9bd16405..a51423bf6e0b0 100644 --- a/core/src/main/resources/lib/form/hetero-list/hetero-list.js +++ b/core/src/main/resources/lib/form/hetero-list/hetero-list.js @@ -58,7 +58,7 @@ Behaviour.specify( btn, menu, menuAlign.split("-"), - 250 + 250, ); // copy class names for (i = 0; i < btn.classList.length; i++) { @@ -151,14 +151,14 @@ Behaviour.specify( opacity: { to: 1 }, }, 0.2, - YAHOO.util.Easing.easeIn + YAHOO.util.Easing.easeIn, ).animate(); Behaviour.applySubtree(nc, true); ensureVisible(nc); layoutUpdateCallback.call(); }, - true + true, ); }); @@ -188,7 +188,7 @@ Behaviour.specify( } }); } - } + }, ); Behaviour.specify("DIV.dd-handle", "hetero-list", -100, function (e) { diff --git a/core/src/main/resources/lib/form/password/password.js b/core/src/main/resources/lib/form/password/password.js index 5b34ffbe7a110..4cd33dbfc6ec8 100644 --- a/core/src/main/resources/lib/form/password/password.js +++ b/core/src/main/resources/lib/form/password/password.js @@ -35,12 +35,12 @@ Behaviour.specify( secretUpdateBtn.onclick = function () { e.querySelector(".hidden-password-field").setAttribute( "type", - "password" + "password", ); e.querySelector(".hidden-password-placeholder").remove(); secretUpdateBtn.remove(); }; - } + }, ); Behaviour.specify( @@ -51,5 +51,5 @@ Behaviour.specify( element.addEventListener("input", function () { element.setAttribute("type", "password"); }); - } + }, ); diff --git a/core/src/main/resources/lib/form/radioBlock/radioBlock.js b/core/src/main/resources/lib/form/radioBlock/radioBlock.js index b6b021896ba13..b504ddeb0d542 100644 --- a/core/src/main/resources/lib/form/radioBlock/radioBlock.js +++ b/core/src/main/resources/lib/form/radioBlock/radioBlock.js @@ -87,5 +87,5 @@ Behaviour.specify( r.onclick = r.onchange = function () { g.updateButtons(); }; - } + }, ); diff --git a/core/src/main/resources/lib/form/repeatable/repeatable.js b/core/src/main/resources/lib/form/repeatable/repeatable.js index 644c2d2d0dfef..b72ef304a037e 100644 --- a/core/src/main/resources/lib/form/repeatable/repeatable.js +++ b/core/src/main/resources/lib/form/repeatable/repeatable.js @@ -66,7 +66,7 @@ var repeatableSupport = { opacity: { to: 1 }, }, 0.2, - YAHOO.util.Easing.easeIn + YAHOO.util.Easing.easeIn, ).animate(); Behaviour.applySubtree(nc, true); @@ -83,7 +83,7 @@ var repeatableSupport = { var addButtonElements = Array.from(this.container.children).filter( function (b) { return b.classList.contains("repeatable-add"); - } + }, ); if (addButtonElements.length == 2) { @@ -96,7 +96,7 @@ var repeatableSupport = { addButtonElements = Array.from(this.container.children).filter( function (b) { return b.classList.contains("repeatable-add"); - } + }, ); if (addButtonElements.length == 1 && this.enableTopButton) { @@ -133,7 +133,7 @@ var repeatableSupport = { height: { to: 0 }, }, 0.2, - YAHOO.util.Easing.easeIn + YAHOO.util.Easing.easeIn, ); a.onComplete.subscribe(function () { var p = n.parentNode; @@ -194,7 +194,7 @@ Behaviour.specify( repeatableSupport.onAdd(button); }); button = null; // avoid memory leak - } + }, ); /** @@ -221,9 +221,9 @@ Behaviour.specify( input.parentNode.replaceChild(button, input); console.warn( "Adapted element to new markup, it should be changed to use f:repeatableDeleteButton instead in the plugin", - button + button, ); - } + }, ); Behaviour.specify( @@ -234,7 +234,7 @@ Behaviour.specify( e.addEventListener("click", function () { repeatableSupport.onDelete(e); }); - } + }, ); // radio buttons in repeatable content diff --git a/core/src/main/resources/lib/form/select/select.js b/core/src/main/resources/lib/form/select/select.js index 450b6ab67e395..3aa7e3ecc7cf9 100644 --- a/core/src/main/resources/lib/form/select/select.js +++ b/core/src/main/resources/lib/form/select/select.js @@ -18,7 +18,7 @@ function updateListBox(listBox, url, config) { if (!settingMain) { console.warn( "Couldn't find the expected validation element (.validation-error-area) for element", - listBox.parentNode + listBox.parentNode, ); return; } diff --git a/core/src/main/resources/lib/form/textarea/textarea.js b/core/src/main/resources/lib/form/textarea/textarea.js index 3d6c7cfa339e3..a31ed7194672d 100644 --- a/core/src/main/resources/lib/form/textarea/textarea.js +++ b/core/src/main/resources/lib/form/textarea/textarea.js @@ -87,5 +87,5 @@ Behaviour.specify( hidePreview.style.display = "none"; previewDiv.style.display = "none"; }; - } + }, ); diff --git a/core/src/main/resources/lib/form/validateButton/adjunct.js b/core/src/main/resources/lib/form/validateButton/adjunct.js index 9e526dc1cf46d..da2a9bf0b55fd 100644 --- a/core/src/main/resources/lib/form/validateButton/adjunct.js +++ b/core/src/main/resources/lib/form/validateButton/adjunct.js @@ -6,5 +6,5 @@ Behaviour.specify( element.onclick = function () { safeValidateButton(this); }; - } + }, ); diff --git a/core/src/main/resources/lib/hudson/build-caption.js b/core/src/main/resources/lib/hudson/build-caption.js index c3b802336205f..b77e5128a60c0 100644 --- a/core/src/main/resources/lib/hudson/build-caption.js +++ b/core/src/main/resources/lib/hudson/build-caption.js @@ -6,7 +6,7 @@ setTimeout(updateBuildCaptionIcon, 5000); } else { var progressBar = document.querySelector( - ".build-caption-progress-container" + ".build-caption-progress-container", ); if (progressBar) { progressBar.style.display = "none"; diff --git a/core/src/main/resources/lib/hudson/progressive-text.js b/core/src/main/resources/lib/hudson/progressive-text.js index 6600604d78441..d0065b8020bbb 100644 --- a/core/src/main/resources/lib/hudson/progressive-text.js +++ b/core/src/main/resources/lib/hudson/progressive-text.js @@ -75,5 +75,5 @@ Behaviour.specify( document.getElementById(idref).fetchedBytes = startOffset !== "" ? Number(startOffset) : 0; fetchNext(document.getElementById(idref), href, onFinishEvent); - } + }, ); diff --git a/core/src/main/resources/lib/hudson/property-table.js b/core/src/main/resources/lib/hudson/property-table.js index 97d17794068ac..b673617fbe593 100644 --- a/core/src/main/resources/lib/hudson/property-table.js +++ b/core/src/main/resources/lib/hudson/property-table.js @@ -17,7 +17,7 @@ if (selection === null || window.getSelection().type !== "Range") { elem.parentElement.classList.add("jenkins-hidden"); elem.parentElement.previousSibling.classList.remove( - "jenkins-hidden" + "jenkins-hidden", ); } }); diff --git a/core/src/main/resources/lib/hudson/widget-refresh.js b/core/src/main/resources/lib/hudson/widget-refresh.js index 2211c93c5412d..8d406488a032b 100644 --- a/core/src/main/resources/lib/hudson/widget-refresh.js +++ b/core/src/main/resources/lib/hudson/widget-refresh.js @@ -6,5 +6,5 @@ Behaviour.specify( var id = e.getAttribute("data-id"); var url = e.getAttribute("data-url"); refreshPart(id, url); - } + }, ); diff --git a/core/src/main/resources/lib/layout/confirmationLink/adjunct.js b/core/src/main/resources/lib/layout/confirmationLink/adjunct.js index 92603448f8982..7df25956479aa 100644 --- a/core/src/main/resources/lib/layout/confirmationLink/adjunct.js +++ b/core/src/main/resources/lib/layout/confirmationLink/adjunct.js @@ -19,5 +19,5 @@ Behaviour.specify( } return false; }; - } + }, ); diff --git a/core/src/main/resources/lib/layout/copyButton/copyButton.js b/core/src/main/resources/lib/layout/copyButton/copyButton.js index 0713405f019aa..334d18e541798 100644 --- a/core/src/main/resources/lib/layout/copyButton/copyButton.js +++ b/core/src/main/resources/lib/layout/copyButton/copyButton.js @@ -32,9 +32,9 @@ Behaviour.specify( } else { hoverNotification( "Copy is only supported with a secure (HTTPS) connection", - copyButton + copyButton, ); } }); - } + }, ); diff --git a/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js b/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js index b55c49b6bbadd..3d674da732188 100644 --- a/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js +++ b/core/src/main/resources/lib/layout/progressiveRendering/progressiveRendering.js @@ -34,19 +34,19 @@ function progressivelyRender(handler, callback, statusId) { "Aborted."; } else if (r.status == "error") { document.querySelector( - "#" + statusId + " .progress-bar-done" + "#" + statusId + " .progress-bar-done", ).style.width = "100%"; document.querySelector( - "#" + statusId + " .progress-bar-left" + "#" + statusId + " .progress-bar-left", ).style.width = "0%"; document.getElementById(statusId).className = "progress-bar red"; } else { callback(r.data); document.querySelector( - "#" + statusId + " .progress-bar-done" + "#" + statusId + " .progress-bar-done", ).style.width = 100 * r.status + "%"; document.querySelector( - "#" + statusId + " .progress-bar-left" + "#" + statusId + " .progress-bar-left", ).style.width = 100 - 100 * r.status + "%"; checkNewsLater(500); } @@ -68,7 +68,7 @@ document.addEventListener("DOMContentLoaded", function () { progressivelyRender( window.proxy, window[holder.getAttribute("data-callback")], - holder.getAttribute("data-id") + holder.getAttribute("data-id"), ); }); }); diff --git a/war/src/main/js/add-item.js b/war/src/main/js/add-item.js index 8bf835b8db48d..99b251d690c39 100644 --- a/war/src/main/js/add-item.js +++ b/war/src/main/js/add-item.js @@ -300,7 +300,7 @@ $.when(getItems()).done(function (data) { activateValidationMessage( "#itemname-invalid", ".add-item-name", - message + message, ); } else { cleanValidationMessages(".add-item-name"); diff --git a/war/src/main/js/api/pluginManager.js b/war/src/main/js/api/pluginManager.js index 0fdcbd82d54f6..2727e99cf7a42 100644 --- a/war/src/main/js/api/pluginManager.js +++ b/war/src/main/js/api/pluginManager.js @@ -24,7 +24,7 @@ pluginManager.initialPluginList = function (handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); }, - } + }, ); }; @@ -112,7 +112,7 @@ pluginManager.installPlugins = function (plugins, handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); }, - } + }, ); }; @@ -141,7 +141,7 @@ pluginManager.installStatus = function (handler, correlationId) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); }, - } + }, ); }; @@ -168,7 +168,7 @@ pluginManager.availablePlugins = function (handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); }, - } + }, ); }; @@ -188,7 +188,7 @@ pluginManager.availablePluginsSearch = function (query, limit, handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); }, - } + }, ); }; @@ -217,7 +217,7 @@ pluginManager.incompleteInstallStatus = function (handler, correlationId) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, errorMessage: errorThrown }); }, - } + }, ); }; @@ -236,7 +236,7 @@ pluginManager.completeInstall = function (handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); }, - } + }, ); }; @@ -254,7 +254,7 @@ pluginManager.getRestartStatus = function (handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); }, - } + }, ); }; @@ -273,7 +273,7 @@ pluginManager.installPluginsDone = function (handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); }, - } + }, ); }; @@ -292,7 +292,7 @@ pluginManager.restartJenkins = function (handler) { error: function (xhr, textStatus, errorThrown) { handler.call({ isError: true, message: errorThrown }); }, - } + }, ); }; diff --git a/war/src/main/js/api/securityConfig.js b/war/src/main/js/api/securityConfig.js index 51633990b1864..576b0e05ff502 100644 --- a/war/src/main/js/api/securityConfig.js +++ b/war/src/main/js/api/securityConfig.js @@ -21,7 +21,7 @@ function saveFirstUser($form, success, error) { }, { error: error, - } + }, ); } @@ -38,7 +38,7 @@ function saveConfigureInstance($form, success, error) { }, { error: error, - } + }, ); } diff --git a/war/src/main/js/components/dropdowns/inpage-jumplist.js b/war/src/main/js/components/dropdowns/inpage-jumplist.js index 97add0173c092..d912b77330a2a 100644 --- a/war/src/main/js/components/dropdowns/inpage-jumplist.js +++ b/war/src/main/js/components/dropdowns/inpage-jumplist.js @@ -12,8 +12,8 @@ function init() { chevron.classList.add("children"); chevron.items = Array.from( document.querySelectorAll( - "form > div > .jenkins-section > .jenkins-section__title" - ) + "form > div > .jenkins-section > .jenkins-section__title", + ), ).map((section) => { section.id = toId(section.textContent); return { label: section.textContent, url: "#" + section.id }; diff --git a/war/src/main/js/components/dropdowns/jumplists.js b/war/src/main/js/components/dropdowns/jumplists.js index 9158be7c3d64d..6af9d5229c240 100644 --- a/war/src/main/js/components/dropdowns/jumplists.js +++ b/war/src/main/js/components/dropdowns/jumplists.js @@ -15,7 +15,7 @@ function generateJumplistAccessors() { const isFirefox = navigator.userAgent.indexOf("Firefox") !== -1; // Firefox adds unwanted lines when copying buttons in text, so use a span instead const dropdownChevron = document.createElement( - isFirefox ? "span" : "button" + isFirefox ? "span" : "button", ); dropdownChevron.className = "jenkins-menu-dropdown-chevron"; dropdownChevron.dataset.href = link.href; @@ -51,13 +51,13 @@ function generateDropdowns() { .then((json) => instance.setContent( Utils.generateDropdownItems( - mapChildrenItemsToDropdownItems(json.items) - ) - ) + mapChildrenItemsToDropdownItems(json.items), + ), + ), ) .catch((error) => console.log(`Jumplist request failed: ${error}`)) .finally(() => (instance.loaded = true)); - }) + }), ); } diff --git a/war/src/main/js/components/dropdowns/overflow-button.js b/war/src/main/js/components/dropdowns/overflow-button.js index a1c825d99632b..55edc6e0de221 100644 --- a/war/src/main/js/components/dropdowns/overflow-button.js +++ b/war/src/main/js/components/dropdowns/overflow-button.js @@ -13,7 +13,7 @@ function init() { Utils.generateDropdown(element, (instance) => { instance.setContent(element.nextElementSibling.content); }); - } + }, ); } diff --git a/war/src/main/js/components/dropdowns/templates.js b/war/src/main/js/components/dropdowns/templates.js index c952f75cb6deb..d20ae72674a09 100644 --- a/war/src/main/js/components/dropdowns/templates.js +++ b/war/src/main/js/components/dropdowns/templates.js @@ -32,7 +32,7 @@ function menuItem(options) { { type: "link", }, - options + options, ); const label = xmlEscape(itemOptions.label); @@ -78,19 +78,19 @@ function menuItem(options) { function heading(label) { return createElementFromHtml( - `
${label}
` + `${label}
`, ); } function separator() { return createElementFromHtml( - `` + ``, ); } function placeholder(label) { return createElementFromHtml( - `${label}
` + `${label}
`, ); } diff --git a/war/src/main/js/components/dropdowns/utils.js b/war/src/main/js/components/dropdowns/utils.js index 3650d05cf0b39..8636d82befbda 100644 --- a/war/src/main/js/components/dropdowns/utils.js +++ b/war/src/main/js/components/dropdowns/utils.js @@ -31,7 +31,7 @@ function generateDropdown(element, callback) { onShown(instance) { behaviorShim.applySubtree(instance.popper); }, - }) + }), ); } @@ -62,7 +62,7 @@ function generateDropdownItems(items) { trigger: "mouseenter", placement: "right-start", offset: [-8, 0], - }) + }), ); } @@ -108,23 +108,23 @@ function generateDropdownItems(items) { const isVisible = window.getComputedStyle(container).visibility === "visible"; const isLastDropdown = Array.from( - document.querySelectorAll(".jenkins-dropdown") + document.querySelectorAll(".jenkins-dropdown"), ) .filter((dropdown) => container !== dropdown) .filter( (dropdown) => - window.getComputedStyle(dropdown).visibility === "visible" + window.getComputedStyle(dropdown).visibility === "visible", ) .every( (dropdown) => !( container.compareDocumentPosition(dropdown) & Node.DOCUMENT_POSITION_FOLLOWING - ) + ), ); return isVisible && isLastDropdown; - } + }, ); behaviorShim.applySubtree(menuItems); diff --git a/war/src/main/js/components/modals/index.js b/war/src/main/js/components/modals/index.js index d2e516935ef84..34a6e55ab1781 100644 --- a/war/src/main/js/components/modals/index.js +++ b/war/src/main/js/components/modals/index.js @@ -11,13 +11,13 @@ export function showModal(contents, options = {}) { const modal = createElementFromHtml( `` + `, ); modal.style.maxWidth = options.maxWidth; if ("title" in options) { const titleElement = createElementFromHtml( - `` + ``, ); titleElement.append(options.title); modal.prepend(titleElement); diff --git a/war/src/main/js/components/notifications/index.js b/war/src/main/js/components/notifications/index.js index 8c5f784006224..eb670da192907 100644 --- a/war/src/main/js/components/notifications/index.js +++ b/war/src/main/js/components/notifications/index.js @@ -56,7 +56,7 @@ function init() { this.init(); this.div.appendChild( - createElementFromHtml(options.icon || this.defaultIcon) + createElementFromHtml(options.icon || this.defaultIcon), ); const message = this.div.appendChild(document.createElement("span")); message.appendChild(document.createTextNode(text)); diff --git a/war/src/main/js/components/row-selection-controller/index.js b/war/src/main/js/components/row-selection-controller/index.js index 395619847bbac..d4de91b89de46 100644 --- a/war/src/main/js/components/row-selection-controller/index.js +++ b/war/src/main/js/components/row-selection-controller/index.js @@ -1,15 +1,15 @@ const rowSelectionControllers = document.querySelectorAll( - ".jenkins-table__checkbox" + ".jenkins-table__checkbox", ); rowSelectionControllers.forEach((headerCheckbox) => { const table = headerCheckbox.closest(".jenkins-table"); const tableCheckboxes = table.querySelectorAll("input[type='checkbox']"); const moreOptionsButton = table.querySelector( - ".jenkins-table__checkbox-options" + ".jenkins-table__checkbox-options", ); const moreOptionsDropdown = table.querySelector( - ".jenkins-table__checkbox-dropdown" + ".jenkins-table__checkbox-dropdown", ); const moreOptionsAllButton = table.querySelector("[data-select='all']"); const moreOptionsNoneButton = table.querySelector("[data-select='none']"); @@ -23,14 +23,14 @@ rowSelectionControllers.forEach((headerCheckbox) => { const allCheckboxesSelected = () => { const selectedCheckboxes = Array.from(tableCheckboxes).filter( - (e) => e.checked + (e) => e.checked, ); return tableCheckboxes.length === selectedCheckboxes.length; }; const anyCheckboxesSelected = () => { const selectedCheckboxes = Array.from(tableCheckboxes).filter( - (e) => e.checked + (e) => e.checked, ); return selectedCheckboxes.length > 0; }; @@ -66,7 +66,7 @@ rowSelectionControllers.forEach((headerCheckbox) => { headerCheckbox.classList.remove("jenkins-table__checkbox--indeterminate"); if (moreOptionsDropdown !== null) { moreOptionsDropdown.classList.remove( - "jenkins-table__checkbox-dropdown--visible" + "jenkins-table__checkbox-dropdown--visible", ); } @@ -89,7 +89,7 @@ rowSelectionControllers.forEach((headerCheckbox) => { return; } moreOptionsDropdown.classList.remove( - "jenkins-table__checkbox-dropdown--visible" + "jenkins-table__checkbox-dropdown--visible", ); } }); @@ -97,7 +97,7 @@ rowSelectionControllers.forEach((headerCheckbox) => { if (moreOptionsButton !== null) { moreOptionsButton.addEventListener("click", () => { moreOptionsDropdown.classList.toggle( - "jenkins-table__checkbox-dropdown--visible" + "jenkins-table__checkbox-dropdown--visible", ); }); } diff --git a/war/src/main/js/components/search-bar/index.js b/war/src/main/js/components/search-bar/index.js index 3b5c89de2e98e..7b8ede4dc7045 100644 --- a/war/src/main/js/components/search-bar/index.js +++ b/war/src/main/js/components/search-bar/index.js @@ -12,11 +12,11 @@ function init() { .forEach((searchBar) => { const searchWrapper = searchBar.parentElement.parentElement; const searchResultsContainer = createElementFromHtml( - `` + ``, ); searchWrapper.appendChild(searchResultsContainer); const searchResults = createElementFromHtml( - `` + ``, ); searchResultsContainer.appendChild(searchResults); @@ -37,16 +37,16 @@ function init() { createElementFromHtml( `No results
` - ) + `No results
`, + ), ); } } @@ -64,13 +64,13 @@ function init() { function showResultsContainer() { searchResultsContainer.classList.add( - "jenkins-search__results-container--visible" + "jenkins-search__results-container--visible", ); } function hideResultsContainer() { searchResultsContainer.classList.remove( - "jenkins-search__results-container--visible" + "jenkins-search__results-container--visible", ); searchResultsContainer.style.height = "1px"; } @@ -84,7 +84,7 @@ function init() { makeKeyboardNavigable( searchResultsContainer, () => searchResults.querySelectorAll("a"), - SELECTED_CLASS + SELECTED_CLASS, ); // Workaround: Firefox doesn't update the dropdown height correctly so diff --git a/war/src/main/js/components/tooltips/index.js b/war/src/main/js/components/tooltips/index.js index 9f6c0918872c5..6b28e3e7f52b2 100644 --- a/war/src/main/js/components/tooltips/index.js +++ b/war/src/main/js/components/tooltips/index.js @@ -39,8 +39,8 @@ function registerTooltip(element) { instance.reference.setAttribute("title", instance.props.content); }, }, - TOOLTIP_BASE - ) + TOOLTIP_BASE, + ), ); } @@ -57,8 +57,8 @@ function registerTooltip(element) { "true"; }, }, - TOOLTIP_BASE - ) + TOOLTIP_BASE, + ), ); } } @@ -82,8 +82,8 @@ function hoverNotification(text, element) { }, 3000); }, }, - TOOLTIP_BASE - ) + TOOLTIP_BASE, + ), ); tooltip.show(); } @@ -95,7 +95,7 @@ function init() { 1000, (element) => { registerTooltip(element); - } + }, ); window.hoverNotification = hoverNotification; diff --git a/war/src/main/js/filter-build-history.js b/war/src/main/js/filter-build-history.js index fcae2cf415ac5..05fa29d05fae0 100644 --- a/war/src/main/js/filter-build-history.js +++ b/war/src/main/js/filter-build-history.js @@ -2,10 +2,10 @@ import debounce from "lodash/debounce"; const buildHistoryContainer = document.getElementById("buildHistory"); const pageSearchInputContainer = buildHistoryContainer.querySelector( - ".build-search-row .jenkins-search" + ".build-search-row .jenkins-search", ); const pageSearchInput = buildHistoryContainer.querySelector( - ".build-search-row input" + ".build-search-row input", ); const buildHistoryPage = document.getElementById("buildHistoryPage"); const properties = document.getElementById("properties"); @@ -91,7 +91,7 @@ function updateBuilds(params) { if (newDataTable.classList.contains("hasPageData")) { buildHistoryPage.setAttribute( "page-entry-newest", - newDataTable.getAttribute("page-entry-newest") + newDataTable.getAttribute("page-entry-newest"), ); } @@ -112,7 +112,7 @@ function createRefreshTimeout(params) { cancelRefreshTimeout(); buildRefreshTimeout = window.setTimeout( () => updateBuilds(params), - updateBuildsRefreshInterval + updateBuildsRefreshInterval, ); } @@ -143,19 +143,19 @@ function getDataTable(buildHistoryDiv) { function updatePageParams(dataTable) { buildHistoryPage.setAttribute( "page-has-up", - dataTable.getAttribute("page-has-up") + dataTable.getAttribute("page-has-up"), ); buildHistoryPage.setAttribute( "page-has-down", - dataTable.getAttribute("page-has-down") + dataTable.getAttribute("page-has-down"), ); buildHistoryPage.setAttribute( "page-entry-newest", - dataTable.getAttribute("page-entry-newest") + dataTable.getAttribute("page-entry-newest"), ); buildHistoryPage.setAttribute( "page-entry-oldest", - dataTable.getAttribute("page-entry-oldest") + dataTable.getAttribute("page-entry-oldest"), ); } function togglePageUpDown() { @@ -330,7 +330,7 @@ function checkRowCellOverflows(row) { // eslint-disable-next-line no-inner-declarations function expandLeftWithRight( leftCellOverFlowParams, - rightCellOverflowParams + rightCellOverflowParams, ) { // Float them left and right... leftCellOverFlowParams.element.style.float = "left"; diff --git a/war/src/main/js/pages/dashboard/index.js b/war/src/main/js/pages/dashboard/index.js index 14bcc467d526e..dd524851c4d5f 100644 --- a/war/src/main/js/pages/dashboard/index.js +++ b/war/src/main/js/pages/dashboard/index.js @@ -5,7 +5,7 @@ document.querySelector("#button-icon-legend").addEventListener("click", () => { const template = document.querySelector("#template-icon-legend"); const title = template.getAttribute("data-title"); const content = createElementFromHtml( - "