Skip to content

Commit

Permalink
Merge branch 'master' into new-details-widget
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Sep 8, 2024
2 parents 7506e5e + c05d756 commit 9824815
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"enabled": false,
"matchPackageNames": [
"org.eclipse.jetty:jetty-maven-plugin",
"org.eclipse.jetty.ee9:jetty-ee9-maven-plugin",
"org.jenkins-ci:winstone"
]
},
Expand Down
6 changes: 5 additions & 1 deletion ath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o xtrace
cd "$(dirname "$0")"

# https://github.com/jenkinsci/acceptance-test-harness/releases
export ATH_VERSION=5957.v7c0e2f7ca_63e
export ATH_VERSION=5968.v180888e51761

if [[ $# -eq 0 ]]; then
export JDK=17
Expand All @@ -26,11 +26,15 @@ fi
mkdir -p target/ath-reports
chmod a+rwx target/ath-reports

# obtain the groupId to grant to access the docker socket to run tests needing docker
dockergid=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ubuntu:noble stat -c %g /var/run/docker.sock)

exec docker run --rm \
--env JDK \
--env ATH_VERSION \
--env BROWSER \
--shm-size 2g `# avoid selenium.WebDriverException exceptions like 'Failed to decode response from marionette' and webdriver closed` \
--group-add ${dockergid} \
--volume "$(pwd)"/war/target/jenkins.war:/jenkins.war:ro \
--volume /var/run/docker.sock:/var/run/docker.sock:rw \
--volume "$(pwd)"/target/ath-reports:/reports:rw \
Expand Down
33 changes: 18 additions & 15 deletions core/src/main/resources/hudson/PluginManager/_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,24 +504,27 @@ window.addEventListener("load", function () {
});
});

// Enable/disable the 'Update' button depending on if any updates are checked
const anyCheckboxesSelected = () => {
return (
document.querySelectorAll("input[type='checkbox']:checked:not(:disabled)")
.length > 0
);
};
const updateButton = document.querySelector("#button-update");
const checkboxes = document.querySelectorAll(
"input[type='checkbox'], [data-select], .jenkins-table__checkbox",
);
checkboxes.forEach((checkbox) => {
checkbox.addEventListener("click", () => {
setTimeout(() => {
updateButton.disabled = !anyCheckboxesSelected();
if (updateButton) {
// Enable/disable the 'Update' button depending on if any updates are checked
const anyCheckboxesSelected = () => {
return (
document.querySelectorAll(
"input[type='checkbox']:checked:not(:disabled)",
).length > 0
);
};
const checkboxes = document.querySelectorAll(
"input[type='checkbox'], [data-select], .jenkins-table__checkbox",
);
checkboxes.forEach((checkbox) => {
checkbox.addEventListener("click", () => {
setTimeout(() => {
updateButton.disabled = !anyCheckboxesSelected();
});
});
});
});
}

// Show update center error if element exists
const updateCenterError = document.querySelector("#update-center-error");
Expand Down
109 changes: 56 additions & 53 deletions core/src/main/resources/hudson/PluginManager/installed.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ THE SOFTWARE.
</span>
</a>
</div>
<j:if test="${p.hasMandatoryDependencies()}">
<div class="dependency-list">
<j:forEach var="dependency" items="${p.mandatoryDependencies}">
<span data-plugin-id="${dependency.shortName}" />
</j:forEach>
</div>
</j:if>
<div class="jenkins-!-margin-top-1">
<j:set var="indexPage" value="${p.indexPage.toString()}"/>
<j:set var="excerpt"
Expand Down Expand Up @@ -170,56 +177,52 @@ THE SOFTWARE.
<l:isAdmin>
<td class="jenkins-table__cell--tight">
<div class="jenkins-table__cell__button-wrapper">
<j:if test="${p.downgradable}">
<form method="post"
class="jenkins-buttons-row"
action="${rootURL}/updateCenter/plugin/${p.shortName}/downgrade">
<button class="jenkins-button jenkins-button--tertiary jenkins-!-color-orange"
style="padding: 0.5rem"
tooltip="${%downgradeTo(p.backupVersion)}">
<l:icon src="symbol-downgrade-circle"/>
<span style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px;">
${p.backupVersion}
</span>
</button>
</form>
</j:if>
<j:if test="${p.downgradable}">
<form method="post"
class="jenkins-buttons-row"
action="${rootURL}/updateCenter/plugin/${p.shortName}/downgrade">
<button class="jenkins-button jenkins-button--tertiary jenkins-!-color-orange"
style="padding: 0.5rem"
tooltip="${%downgradeTo(p.backupVersion)}">
<l:icon src="symbol-downgrade-circle"/>
<span
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px;">
${p.backupVersion}
</span>
</button>
</form>
</j:if>
</div>
</td>
<td class="jenkins-table__cell--tight uninstall">
<div class="jenkins-table__cell__button-wrapper">
<j:choose>
<j:when test="${p.isDeleted()}">
<p>${%Uninstallation pending}</p>
</j:when>
<j:otherwise>
<j:if test="${p.hasMandatoryDependents() or p.hasImpliedDependents()}">
<div class="dependent-list">
<j:forEach var="dependent" items="${p.mandatoryDependents}">
<span data-plugin-id="${dependent}"></span>
</j:forEach>
<j:set var="impliedDependents" value="${p.impliedDependents}"/>
<j:choose>
<j:when test="${impliedDependents.size() lt 15}">
<j:forEach var="dependent" items="${impliedDependents}">
<span data-plugin-id="${dependent}"></span>
</j:forEach>
</j:when>
<j:otherwise>
<p>
${%detached-many-dependents(impliedDependents.size())}
</p>
</j:otherwise>
</j:choose>
</div>
</j:if>
<j:if test="${p.hasMandatoryDependencies()}">
<div class="dependency-list">
<j:forEach var="dependency" items="${p.mandatoryDependencies}">
<span data-plugin-id="${dependency.shortName}"></span>
</j:forEach>
</div>
</j:if>
</l:isAdmin>
<td class="jenkins-table__cell--tight uninstall ${readOnlyMode and !p.isDeleted() ? 'jenkins-hidden' : ''}">
<div class="jenkins-table__cell__button-wrapper">
<j:choose>
<j:when test="${p.isDeleted()}">
<p>${%Uninstallation pending}</p>
</j:when>
<j:otherwise>
<j:if test="${p.hasMandatoryDependents() or p.hasImpliedDependents()}">
<div class="dependent-list">
<j:forEach var="dependent" items="${p.mandatoryDependents}">
<span data-plugin-id="${dependent}" />
</j:forEach>
<j:set var="impliedDependents" value="${p.impliedDependents}"/>
<j:choose>
<j:when test="${impliedDependents.size() lt 15}">
<j:forEach var="dependent" items="${impliedDependents}">
<span data-plugin-id="${dependent}" />
</j:forEach>
</j:when>
<j:otherwise>
<p>
${%detached-many-dependents(impliedDependents.size())}
</p>
</j:otherwise>
</j:choose>
</div>
</j:if>
<l:isAdmin>
<button data-action="uninstall"
type="button"
class="jenkins-button jenkins-button--tertiary jenkins-!-destructive-color"
Expand All @@ -228,11 +231,11 @@ THE SOFTWARE.
data-message="${%uninstall-title(p.updateInfo.displayName ?: p.displayName)}">
<l:icon src="symbol-close-circle"/>
</button>
</j:otherwise>
</j:choose>
</div>
</td>
</l:isAdmin>
</l:isAdmin>
</j:otherwise>
</j:choose>
</div>
</td>
</tr>
</j:forEach>
<!-- failed ones -->
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ THE SOFTWARE.
<antlr.version>4.13.2</antlr.version>
<bridge-method-injector.version>1.29</bridge-method-injector.version>
<spotless.check.skip>false</spotless.check.skip>
<!-- Make sure to keep the jetty-maven-plugin version in war/pom.xml in sync with the Jetty release in Winstone: -->
<winstone.version>8.0</winstone.version>
<!-- Make sure to keep the jetty-ee9-maven-plugin version in war/pom.xml in sync with the Jetty release in Winstone: -->
<winstone.version>8.1</winstone.version>
</properties>

<!--
Expand Down
4 changes: 2 additions & 2 deletions war/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"globals": "15.9.0",
"handlebars-loader": "1.7.3",
"mini-css-extract-plugin": "2.9.1",
"postcss": "8.4.43",
"postcss": "8.4.45",
"postcss-loader": "8.1.1",
"postcss-preset-env": "10.0.2",
"postcss-scss": "4.0.9",
"prettier": "3.3.3",
"sass": "1.77.8",
"sass": "1.78.0",
"sass-loader": "16.0.1",
"style-loader": "4.0.0",
"stylelint": "16.9.0",
Expand Down
4 changes: 2 additions & 2 deletions war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ THE SOFTWARE.
</configuration>
</execution>
<execution>
<!-- see jetty-maven-plugin config and WebAppMain -->
<!-- see jetty-ee9-maven-plugin config and WebAppMain -->
<id>support-log-formatter</id>
<goals>
<goal>copy</goal>
Expand Down Expand Up @@ -642,7 +642,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-maven-plugin</artifactId>
<version>12.0.12</version>
<version>12.0.13</version>
<configuration>
<!--
Reload webapp when you hit ENTER. (See JETTY-282 for more)
Expand Down
20 changes: 10 additions & 10 deletions war/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4393,12 +4393,12 @@ __metadata:
jquery: "npm:3.7.1"
lodash: "npm:4.17.21"
mini-css-extract-plugin: "npm:2.9.1"
postcss: "npm:8.4.43"
postcss: "npm:8.4.45"
postcss-loader: "npm:8.1.1"
postcss-preset-env: "npm:10.0.2"
postcss-scss: "npm:4.0.9"
prettier: "npm:3.3.3"
sass: "npm:1.77.8"
sass: "npm:1.78.0"
sass-loader: "npm:16.0.1"
sortablejs: "npm:1.15.3"
style-loader: "npm:4.0.0"
Expand Down Expand Up @@ -6073,14 +6073,14 @@ __metadata:
languageName: node
linkType: hard

"postcss@npm:8.4.43, postcss@npm:^8.4.33, postcss@npm:^8.4.38, postcss@npm:^8.4.41":
version: 8.4.43
resolution: "postcss@npm:8.4.43"
"postcss@npm:8.4.45, postcss@npm:^8.4.33, postcss@npm:^8.4.38, postcss@npm:^8.4.41":
version: 8.4.45
resolution: "postcss@npm:8.4.45"
dependencies:
nanoid: "npm:^3.3.7"
picocolors: "npm:^1.0.1"
source-map-js: "npm:^1.2.0"
checksum: 10c0/7cc9c6393ca00fcdca6fef8d119218df9357389b9fed30b6d4b463fc0e85159595a877f4ac0a2a565ea4c447cab1f424e527e68d8b7d40b8c94a6684663d45c5
checksum: 10c0/ad6f8b9b1157d678560373696109745ab97a947d449f8a997acac41c7f1e4c0f3ca4b092d6df1387f430f2c9a319987b1780dbdc27e35800a88cde9b606c1e8f
languageName: node
linkType: hard

Expand Down Expand Up @@ -6356,16 +6356,16 @@ __metadata:
languageName: node
linkType: hard

"sass@npm:1.77.8":
version: 1.77.8
resolution: "sass@npm:1.77.8"
"sass@npm:1.78.0":
version: 1.78.0
resolution: "sass@npm:1.78.0"
dependencies:
chokidar: "npm:>=3.0.0 <4.0.0"
immutable: "npm:^4.0.0"
source-map-js: "npm:>=0.6.2 <2.0.0"
bin:
sass: sass.js
checksum: 10c0/2bfd62794070352c804f949e69bd8bb5b4ec846deeb924251b2c3f7b503170fb1ae186f513f0166907749eb34e0277dee747edcb78c886fb471aac01be1e864c
checksum: 10c0/6577a87c00b03a5a50f3a11b4b6592f28abce34e61812e381535a3b712151bd94db3ca06467d20395431e0f38a23f99e616d6859d771fb6d4617c359f590c48c
languageName: node
linkType: hard

Expand Down

0 comments on commit 9824815

Please sign in to comment.