Skip to content

Commit ef9c5ae

Browse files
committed
Merge branch 'master' into command-palette--add-icons
2 parents dd15dce + a2ce953 commit ef9c5ae

File tree

12 files changed

+72
-63
lines changed

12 files changed

+72
-63
lines changed

.github/renovate.json

-10
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,6 @@
7171
"org.fusesource.jansi:jansi"
7272
]
7373
},
74-
{
75-
"description": "Depends on commons-lang3 which is in progress for removal from core. See: https://issues.jenkins.io/browse/JENKINS-73355",
76-
"matchManagers": [
77-
"maven"
78-
],
79-
"enabled": false,
80-
"matchPackageNames": [
81-
"org.apache.commons:commons-compress"
82-
]
83-
},
8474
{
8575
"description": "Contains incompatible API changes and needs compatibility work. See: https://github.com/jenkinsci/jenkins/pull/4224",
8676
"matchManagers": [

bom/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@ THE SOFTWARE.
191191
<artifactId>ant</artifactId>
192192
<version>1.10.15</version>
193193
</dependency>
194-
<dependency>
195-
<groupId>org.apache.commons</groupId>
196-
<artifactId>commons-compress</artifactId>
197-
<version>1.26.1</version>
198-
</dependency>
199194
<dependency>
200195
<groupId>org.apache.commons</groupId>
201196
<artifactId>commons-fileupload2</artifactId>

core/pom.xml

-11
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,6 @@ THE SOFTWARE.
285285
<groupId>org.apache.ant</groupId>
286286
<artifactId>ant</artifactId>
287287
</dependency>
288-
<dependency>
289-
<groupId>org.apache.commons</groupId>
290-
<artifactId>commons-compress</artifactId>
291-
<exclusions>
292-
<!-- Only needed for Pack200UnpackerAdapter, which we do not use -->
293-
<exclusion>
294-
<groupId>org.apache.commons</groupId>
295-
<artifactId>commons-lang3</artifactId>
296-
</exclusion>
297-
</exclusions>
298-
</dependency>
299288
<dependency>
300289
<groupId>org.apache.commons</groupId>
301290
<artifactId>commons-fileupload2-core</artifactId>

core/src/main/java/jenkins/telemetry/Telemetry.java

+5
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ public static ExtensionList<Telemetry> all() {
130130
return ExtensionList.lookup(Telemetry.class);
131131
}
132132

133+
@Restricted(NoExternalUse.class) // called by jelly
134+
public static boolean isAnyTrialActive() {
135+
return all().stream().anyMatch(Telemetry::isActivePeriod);
136+
}
137+
133138
/**
134139
* @since 2.147
135140
* @return whether to collect telemetry

core/src/main/resources/hudson/model/UsageStatistics/global.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def f=namespace(lib.FormTagLib)
88

99
f.section(title: _("Usage Statistics")) {
1010
if (UsageStatistics.DISABLED) {
11-
span(class: "jenkins-not-applicable") {
11+
div(class: "jenkins-not-applicable jenkins-description") {
1212
raw(_("disabledBySystemProperty"))
1313
}
1414
} else if (FIPS140.useCompliantAlgorithms()) {
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?jelly escape-by-default='true'?>
22
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
3-
<div>
3+
<p>
44
For any project, it's critical to know how the software is used, but tracking usage data is inherently difficult in open-source projects.
55
Anonymous usage statistics address this need.
66
When enabled, Jenkins periodically sends information to the Jenkins project.
77
The Jenkins project uses this information to set development priorities.
8-
</div>
8+
</p>
99
<j:invokeStatic className="jenkins.security.FIPS140" method="useCompliantAlgorithms" var="fips"/>
1010
<j:if test="${!fips}">
11-
<h1>General usage statistics</h1>
11+
<h3>General usage statistics</h3>
1212
<div>
1313
<p>Jenkins reports the following general usage statistics:</p>
1414
<ul>
@@ -24,7 +24,7 @@
2424
</p>
2525
</div>
2626
</j:if>
27-
<h1>Telemetry collection</h1>
27+
<h3>Telemetry collection</h3>
2828
<div>
2929
<p>
3030
<j:choose>
@@ -38,24 +38,34 @@
3838
Each trial has a specific purpose and a defined end date, after which collection stops, independent of the installed versions of Jenkins or plugins.
3939
Once a trial is complete, the trial results may be aggregated and shared with the developer community.
4040
</p>
41-
<p>
42-
The following trials defined on this instance are active now or in the future:
43-
</p>
41+
4442
<j:invokeStatic className="jenkins.telemetry.Telemetry" method="all" var="collectors"/>
43+
<j:invokeStatic className="jenkins.telemetry.Telemetry" method="isAnyTrialActive" var="anyTrialActive"/>
4544
<j:invokeStatic className="java.time.LocalDate" method="now" var="now"/>
46-
<dl>
47-
<j:forEach items="${collectors}" var="collector">
48-
<j:if test="${not collector.end.isBefore(now)}">
49-
<dt>${collector.displayName}</dt>
50-
<dd>
51-
<st:include it="${collector}" optional="true" page="description.jelly"/>
52-
<p>
53-
Start date: ${collector.start}<br/>
54-
End date: ${collector.end}
55-
</p>
56-
</dd>
57-
</j:if>
58-
</j:forEach>
59-
</dl>
45+
<j:choose>
46+
<j:when test="${!anyTrialActive}">
47+
<p>${%There are currently no active trials.}</p>
48+
</j:when>
49+
<j:otherwise>
50+
<p>
51+
The following trials defined on this instance are active now or in the future:
52+
</p>
53+
<dl>
54+
<j:forEach items="${collectors}" var="collector">
55+
<j:if test="${not collector.end.isBefore(now)}">
56+
<dt>${collector.displayName}</dt>
57+
<dd>
58+
<st:include it="${collector}" optional="true" page="description.jelly"/>
59+
<p>
60+
Start date: ${collector.start}
61+
<br/>
62+
End date: ${collector.end}
63+
</p>
64+
</dd>
65+
</j:if>
66+
</j:forEach>
67+
</dl>
68+
</j:otherwise>
69+
</j:choose>
6070
</div>
6171
</j:jelly>

core/src/main/resources/lib/form/toggleSwitch.jelly

+7-7
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ THE SOFTWARE.
7676
disabled="${readOnlyMode ? 'true' : null}"
7777
checked="${value ? 'true' : null}"/>
7878
<label class="jenkins-toggle-switch__label ${id != null ? '' : 'attach-previous'}"
79-
for="${id}" data-title="${title}" data-checked-title="${checkedTitle}">
79+
for="${attrs.id}" data-title="${attrs.title}" data-checked-title="${attrs.checkedTitle}">
8080
<j:choose>
81-
<j:when test="${checkedTitle == null}">
82-
${title}
81+
<j:when test="${attrs.checkedTitle == null}">
82+
${attrs.title}
8383
</j:when>
8484
<j:otherwise>
85-
<span class="jenkins-toggle-switch__label__unchecked-title">${title}</span>
86-
<span class="jenkins-toggle-switch__label__checked-title">${checkedTitle}</span>
85+
<span class="jenkins-toggle-switch__label__unchecked-title">${attrs.title}</span>
86+
<span class="jenkins-toggle-switch__label__checked-title">${attrs.checkedTitle}</span>
8787
</j:otherwise>
8888
</j:choose>
8989
</label>
90-
<j:if test="${description != null and !description.trim().isEmpty()}">
91-
<span class="jenkins-toggle-switch__description">${description}</span>
90+
<j:if test="${attrs.description != null and !attrs.description.trim().isEmpty()}">
91+
<span class="jenkins-toggle-switch__description">${attrs.description}</span>
9292
</j:if>
9393
</span>
9494
</j:jelly>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"lint": "yarn lint:js && yarn lint:css"
2424
},
2525
"devDependencies": {
26-
"@babel/cli": "7.25.9",
26+
"@babel/cli": "7.26.4",
2727
"@babel/core": "7.26.0",
2828
"@babel/preset-env": "7.26.0",
2929
"@eslint/js": "9.16.0",

src/main/scss/base/_style.scss

+20
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ pre.console {
372372
border-radius: 6px;
373373
z-index: 0;
374374

375+
--section-padding: 0.8rem;
376+
375377
&::before {
376378
content: "";
377379
position: absolute;
@@ -389,6 +391,24 @@ pre.console {
389391
p:last-of-type {
390392
margin-bottom: 0;
391393
}
394+
395+
// add spacing above headings except for when its the first element in the help
396+
// the need for this is caused by p:last-of-type setting margin-bottom to 0
397+
// unfortunately because of the varied markup I wasn't able to find a way to avoid this
398+
h1:not(:first-child),
399+
.h1:not(:first-child),
400+
h2:not(:first-child),
401+
.h2:not(:first-child),
402+
h3:not(:first-child),
403+
.h3:not(:first-child),
404+
h4:not(:first-child),
405+
.h4:not(:first-child),
406+
h5:not(:first-child),
407+
.h5:not(:first-child),
408+
h6:not(:first-child),
409+
.h6:not(:first-child) {
410+
margin-top: var(--section-padding);
411+
}
392412
}
393413

394414
.help .from-plugin {

test/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ THE SOFTWARE.
230230
<dependency>
231231
<groupId>org.jenkins-ci.plugins</groupId>
232232
<artifactId>junit</artifactId>
233-
<version>1309.v0078b_fecd6ed</version>
233+
<version>1311.v39e1716e4eb_e</version>
234234
<scope>test</scope>
235235
</dependency>
236236
<dependency>

war/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ THE SOFTWARE.
314314
<!-- detached after 1.577 -->
315315
<groupId>org.jenkins-ci.plugins</groupId>
316316
<artifactId>junit</artifactId>
317-
<version>1309.v0078b_fecd6ed</version>
317+
<version>1311.v39e1716e4eb_e</version>
318318
<type>hpi</type>
319319
</artifactItem>
320320
<artifactItem>

yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ __metadata:
1515
languageName: node
1616
linkType: hard
1717

18-
"@babel/cli@npm:7.25.9":
19-
version: 7.25.9
20-
resolution: "@babel/cli@npm:7.25.9"
18+
"@babel/cli@npm:7.26.4":
19+
version: 7.26.4
20+
resolution: "@babel/cli@npm:7.26.4"
2121
dependencies:
2222
"@jridgewell/trace-mapping": "npm:^0.3.25"
2323
"@nicolo-ribaudo/chokidar-2": "npm:2.1.8-no-fsevents.3"
@@ -38,7 +38,7 @@ __metadata:
3838
bin:
3939
babel: ./bin/babel.js
4040
babel-external-helpers: ./bin/babel-external-helpers.js
41-
checksum: 10c0/2e8228c3715e220fa902888c643ce1a89c4ee90be3d9f7a31218d5bb2500456e0cef12cb90fd5877ab3e5a4498df8f27670425d346422a3eb52052fd3184d520
41+
checksum: 10c0/f2d4fc3c4a34dd3001e3bd7084b78b38211003c36afaf2dc8fedf4565c0442bd59b1c64a9f91a0b7b2450e089123f197e09577ae50dc994307c3348b310ce34c
4242
languageName: node
4343
linkType: hard
4444

@@ -4369,7 +4369,7 @@ __metadata:
43694369
version: 0.0.0-use.local
43704370
resolution: "jenkins-ui@workspace:."
43714371
dependencies:
4372-
"@babel/cli": "npm:7.25.9"
4372+
"@babel/cli": "npm:7.26.4"
43734373
"@babel/core": "npm:7.26.0"
43744374
"@babel/preset-env": "npm:7.26.0"
43754375
"@eslint/js": "npm:9.16.0"

0 commit comments

Comments
 (0)