Skip to content

Commit 668c686

Browse files
committed
Merge branch 'master' of https://github.com/jenkinsci/jenkins into _cleanUpDisconnectComputers
2 parents cfebcec + 7aa3447 commit 668c686

File tree

12 files changed

+273
-258
lines changed

12 files changed

+273
-258
lines changed

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ THE SOFTWARE.
144144
<dependency>
145145
<groupId>net.java.dev.jna</groupId>
146146
<artifactId>jna</artifactId>
147-
<version>5.17.0</version>
147+
<version>5.18.0</version>
148148
</dependency>
149149
<dependency>
150150
<groupId>net.java.sezpoz</groupId>

core/src/main/resources/hudson/model/Run/new-build-page.jelly

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,33 +41,14 @@ THE SOFTWARE.
4141

4242
<t:buildCaption controls="${controls}">${it.displayName}</t:buildCaption>
4343

44+
<l:details-bar it="${it}" />
45+
4446
<div>
4547
<t:editableDescription permission="${it.UPDATE}" hideButton="true"/>
4648
</div>
4749

4850
<div class="app-build__grid">
4951
<st:include page="console.jelly" from="${h.getConsoleProviderFor(it)}" optional="true" />
50-
<l:card title="${%Details}">
51-
<div class="jenkins-card__details">
52-
<j:forEach var="group" items="${h.getDetailsFor(it)}" indexVar="index">
53-
<j:if test="${index gt 0}">
54-
<hr />
55-
</j:if>
56-
<j:forEach var="detail" items="${group.value}">
57-
<st:include page="detail.jelly" it="${detail}" optional="true">
58-
<x:element name="${detail.link != null ? 'a' : 'div'}">
59-
<x:attribute name="class">jenkins-card__details__item</x:attribute>
60-
<x:attribute name="href">${detail.link}</x:attribute>
61-
<div class="jenkins-card__details__item__icon">
62-
<l:icon src="${detail.iconClassName}" />
63-
</div>
64-
${detail.displayName}
65-
</x:element>
66-
</st:include>
67-
</j:forEach>
68-
</j:forEach>
69-
</div>
70-
</l:card>
7152

7253
<l:card title="Summary">
7354
<div>

core/src/main/resources/jenkins/model/details/DurationDetail/detail.jelly

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ THE SOFTWARE.
2525
<?jelly escape-by-default='true'?>
2626
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
2727
<j:set var="object" value="${it.object}" />
28-
<div class="jenkins-card__details__item">
29-
<div class="jenkins-card__details__item__icon">
28+
<div class="jenkins-details__item">
29+
<div class="jenkins-details__item__icon">
3030
<l:icon src="symbol-timer" />
3131
</div>
3232
<div>

core/src/main/resources/jenkins/model/details/TimestampDetail/detail.jelly

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,15 @@ THE SOFTWARE.
2323
-->
2424

2525
<?jelly escape-by-default='true'?>
26-
<j:jelly xmlns:j="jelly:core" xmlns:i="jelly:fmt">
26+
<j:jelly xmlns:j="jelly:core" xmlns:i="jelly:fmt" xmlns:l="/lib/layout">
2727
<j:set var="object" value="${it.getObject()}" />
2828
<i:formatDate var="tooltip" value="${object.timestamp.time}" type="both" dateStyle="long" timeStyle="medium" />
2929

30-
<div class="jenkins-card__details__item">
31-
<j:set var="minutes" value="${360 * (object.timestamp.time.minutes / 60)}" />
32-
<i:formatDate var="hours" value="${object.timestamp.time}" pattern="h" />
33-
<j:set var="hours" value="${360 * (hours / 12) + (30 * (object.timestamp.time.minutes / 60))}" />
34-
35-
<div class="jenkins-card__details__item__icon">
36-
<div class="app-build__clock" style="--hours: ${hours}deg; --minutes: ${minutes}deg">
37-
<span class="app-build__clock__hours" />
38-
<span class="app-build__clock__minutes" />
39-
</div>
30+
<div class="jenkins-details__item" tooltip="${tooltip}" data-tooltip-delay="500">
31+
<div class="jenkins-details__item__icon">
32+
<l:icon src="symbol-clock" />
4033
</div>
41-
42-
<span tooltip="${tooltip}" data-tooltip-delay="500">
34+
<span>
4335
${%startedAgo(object.timestampString)}
4436
</span>
4537
</div>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!--
2+
The MIT License
3+
4+
Copyright (c) 2025 Jan Faracik
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
-->
24+
<?jelly escape-by-default='true'?>
25+
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:x="jelly:xml">
26+
<st:documentation>
27+
A wrappable bar of details about the given object.
28+
29+
<st:attribute name="it" use="required">
30+
The object to display details for.
31+
</st:attribute>
32+
</st:documentation>
33+
34+
<div class="jenkins-details">
35+
<j:forEach var="group" items="${h.getDetailsFor(it)}" indexVar="index">
36+
<j:if test="${index gt 0}">
37+
<div class="jenkins-details__separator">•</div>
38+
</j:if>
39+
<j:forEach var="detail" items="${group.value}">
40+
<st:include page="detail.jelly" it="${detail}" optional="true">
41+
<j:if test="${detail.iconClassName != null}">
42+
<x:element name="${detail.link != null ? 'a' : 'div'}">
43+
<x:attribute name="class">jenkins-details__item</x:attribute>
44+
<x:attribute name="href">${detail.link}</x:attribute>
45+
<div class="jenkins-details__item__icon">
46+
<l:icon src="${detail.iconClassName}" />
47+
</div>
48+
${detail.displayName}
49+
</x:element>
50+
</j:if>
51+
</st:include>
52+
</j:forEach>
53+
</j:forEach>
54+
</div>
55+
</j:jelly>

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
"@babel/cli": "7.28.3",
2727
"@babel/core": "7.28.4",
2828
"@babel/preset-env": "7.28.3",
29-
"@eslint/js": "9.35.0",
29+
"@eslint/js": "9.36.0",
3030
"babel-loader": "10.0.0",
3131
"clean-webpack-plugin": "4.0.0",
3232
"css-loader": "7.1.2",
3333
"css-minimizer-webpack-plugin": "7.0.2",
34-
"eslint": "9.35.0",
34+
"eslint": "9.36.0",
3535
"eslint-config-prettier": "10.1.8",
3636
"eslint-formatter-checkstyle": "8.40.0",
3737
"globals": "16.4.0",
3838
"handlebars-loader": "1.7.3",
3939
"mini-css-extract-plugin": "2.9.4",
4040
"postcss": "8.5.6",
4141
"postcss-loader": "8.2.0",
42-
"postcss-preset-env": "10.3.1",
42+
"postcss-preset-env": "10.4.0",
4343
"postcss-scss": "4.0.9",
4444
"prettier": "3.6.2",
4545
"sass": "1.92.1",

src/main/scss/components/_cards.scss

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
$card-padding: 1rem;
2-
$icon-size: 1.375rem;
32

43
.jenkins-card {
54
position: relative;
@@ -111,35 +110,6 @@ $icon-size: 1.375rem;
111110
}
112111
}
113112

114-
.jenkins-card__details {
115-
display: flex;
116-
flex-direction: column;
117-
align-items: start;
118-
gap: 0.75rem;
119-
}
120-
121-
.jenkins-card__details__item {
122-
display: grid;
123-
grid-template-columns: auto 1fr;
124-
gap: 0.75rem;
125-
font-weight: normal;
126-
127-
&__icon {
128-
display: flex;
129-
align-items: center;
130-
justify-content: center;
131-
align-self: start;
132-
width: $icon-size;
133-
height: 1lh;
134-
135-
svg {
136-
width: $icon-size;
137-
height: $icon-size;
138-
color: var(--text-color);
139-
}
140-
}
141-
}
142-
143113
.jenkins-graph-card {
144114
background: white;
145115
padding: 0.5rem;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
$icon-size: 1.125rem;
2+
3+
.jenkins-details {
4+
display: flex;
5+
gap: 0.75rem 1.25rem;
6+
flex-wrap: wrap;
7+
8+
&__item {
9+
display: grid;
10+
grid-template-columns: auto 1fr;
11+
gap: 0.5rem;
12+
font-weight: normal;
13+
color: var(--text-color-secondary);
14+
15+
&__icon {
16+
display: flex;
17+
align-items: center;
18+
justify-content: center;
19+
align-self: start;
20+
width: $icon-size;
21+
height: 1lh;
22+
23+
svg {
24+
width: $icon-size;
25+
height: $icon-size;
26+
27+
* {
28+
stroke-width: 40px;
29+
}
30+
}
31+
}
32+
}
33+
34+
&__separator {
35+
color: var(--text-color-secondary);
36+
opacity: 0.5;
37+
}
38+
}

src/main/scss/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@use "cards";
88
@use "command-palette";
99
@use "content-blocks";
10+
@use "details";
1011
@use "dialogs";
1112
@use "dropdowns";
1213
@use "healthScore";

src/main/scss/pages/_build.scss

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
.jenkins-card {
5757
&:first-of-type {
58-
grid-column: span 2;
58+
grid-column: span 3;
5959
}
6060

6161
&:last-of-type {
@@ -69,7 +69,7 @@
6969

7070
.jenkins-card {
7171
&:first-of-type {
72-
grid-column: span 3;
72+
grid-column: span 4;
7373
}
7474

7575
&:last-of-type {
@@ -83,7 +83,7 @@
8383

8484
.jenkins-card {
8585
&:first-of-type {
86-
grid-column: span 3;
86+
grid-column: span 5;
8787
}
8888

8989
&:last-of-type {
@@ -93,55 +93,6 @@
9393
}
9494
}
9595

96-
.app-build__clock {
97-
position: relative;
98-
width: 1.5rem;
99-
height: 1.5rem;
100-
flex-shrink: 0;
101-
scale: 0.75;
102-
103-
&__hours,
104-
&__minutes {
105-
position: absolute;
106-
inset: 0;
107-
border-radius: 100%;
108-
109-
&::after {
110-
content: "";
111-
position: absolute;
112-
bottom: 11px;
113-
left: 11px;
114-
width: 2px;
115-
background: currentColor;
116-
border-radius: 2px;
117-
}
118-
}
119-
120-
&__hours {
121-
rotate: var(--hours);
122-
123-
&::after {
124-
height: 6px;
125-
}
126-
}
127-
128-
&__minutes {
129-
rotate: var(--minutes);
130-
131-
&::after {
132-
height: 8px;
133-
}
134-
}
135-
136-
&::after {
137-
position: absolute;
138-
content: "";
139-
inset: 0;
140-
border-radius: 100%;
141-
border: 2px solid currentColor;
142-
}
143-
}
144-
14596
.app-console-output-widget {
14697
overflow-y: auto;
14798
margin: 0 -1rem -1rem;

0 commit comments

Comments
 (0)