Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New header #196

Open
wants to merge 157 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
5a0eee2
WB
janfaracik Jan 16, 2025
c9c8669
Push
janfaracik Jan 16, 2025
82b85a2
More responsive
janfaracik Jan 16, 2025
3d08ab8
Update headerContent.jelly
janfaracik Jan 16, 2025
f04343b
Push
janfaracik Jan 16, 2025
6fbb8e8
Update logo.jelly
janfaracik Jan 16, 2025
6fbabad
Update _page-header.scss
janfaracik Jan 16, 2025
363b63a
Update _page-header.scss
janfaracik Jan 16, 2025
278f8c5
Update header
janfaracik Jan 16, 2025
0b1eb50
Merge branch 'master' into new-header
janfaracik Jan 16, 2025
46b4296
Merge branch 'master' into new-header
janfaracik Jan 18, 2025
53d1f72
Tidy up breadcrumbs
janfaracik Jan 18, 2025
ae239df
Tidy up focus
janfaracik Jan 18, 2025
d85458f
Update _breadcrumbs.scss
janfaracik Jan 18, 2025
cd3c384
Update configure.jelly
janfaracik Jan 18, 2025
a5e3d54
push
janfaracik Jan 18, 2025
5b340a8
Add badges
janfaracik Jan 18, 2025
73b81a3
Tidy
janfaracik Jan 18, 2025
a04b8f2
Push
janfaracik Jan 18, 2025
82a3d80
Update headerContent.jelly
janfaracik Jan 18, 2025
1123309
Update ManageJenkinsAction.java
janfaracik Jan 18, 2025
d5c986f
Update headerContent.jelly
janfaracik Jan 18, 2025
25f04d9
Working!
janfaracik Jan 18, 2025
244f48d
WB
janfaracik Jan 18, 2025
abe4770
Tidy up
janfaracik Jan 18, 2025
3970e8d
Fixes
janfaracik Jan 18, 2025
be07296
Update sidepanel.jelly
janfaracik Jan 18, 2025
7134580
Lint
janfaracik Jan 19, 2025
cf56f45
Tidy up
janfaracik Jan 19, 2025
21c74a7
Update ManageJenkinsAction.java
janfaracik Jan 19, 2025
aab79d0
Simplify
janfaracik Jan 19, 2025
5ddd415
Update _side-panel-tasks.scss
janfaracik Jan 19, 2025
5c8f872
Merge branch 'simplify-search' into new-header
janfaracik Jan 19, 2025
181d9d2
Update _side-panel-tasks.scss
janfaracik Jan 19, 2025
46a9c35
Update UserAction.java
janfaracik Jan 19, 2025
bb7b73f
Update Jenkins.java
janfaracik Jan 19, 2025
7131e9a
Add border to account image
janfaracik Jan 19, 2025
15fc210
Tidy up avatars
janfaracik Jan 19, 2025
9b5dd43
Merge branch 'master' into new-header
janfaracik Jan 20, 2025
a309687
Update _side-panel-tasks.scss
janfaracik Jan 20, 2025
564f050
Init
janfaracik Jan 20, 2025
b447e27
Tidy up
janfaracik Jan 20, 2025
0ebc7f1
Merge branch 'circle-avatar' into new-header
janfaracik Jan 20, 2025
77b0baa
Merge branch 'improve-dialog' into new-header
janfaracik Jan 20, 2025
c2fb2ad
Merge branch 'rename-jenkins-in-tab-title' into new-header
janfaracik Jan 20, 2025
ae34b38
Remove `robust-http-client`
basil Jan 21, 2025
a800200
Merge branch 'master' into new-header
janfaracik Jan 22, 2025
60e0a00
Hide behind flag
janfaracik Jan 23, 2025
9cc86bd
Update sidepanel.jelly
janfaracik Jan 23, 2025
b403502
Push
janfaracik Jan 23, 2025
d89c24c
Tidy up
janfaracik Jan 23, 2025
6bacea0
Update logo.jelly
janfaracik Jan 23, 2025
ac72328
Merge branch 'master' into new-header
janfaracik Jan 25, 2025
1becb26
Accessibility
janfaracik Jan 26, 2025
7a42953
Update _breadcrumbs-new.scss
janfaracik Jan 26, 2025
f76088b
Fix dropdown theme
janfaracik Jan 27, 2025
7c16c18
Update _breadcrumbs.scss
janfaracik Jan 29, 2025
dc7a46d
Update _header.scss
janfaracik Jan 29, 2025
e5c3670
Update ManageJenkinsAction.java
janfaracik Jan 30, 2025
3397f39
Remove flag
janfaracik Jan 30, 2025
79c1280
Tidy up
janfaracik Jan 30, 2025
2c878d7
removed obsolete exclusion
StefanSpieker Jan 30, 2025
0ca3211
Reapply "[JENKINS-75174] Move existing `web.xml` to `web-fragment.xml…
Vlatombe Jan 31, 2025
2ea0b1f
Update with HeaderAction
janfaracik Jan 31, 2025
25a6a84
Update jetty plugin configuration for configuration discovery
Vlatombe Jan 31, 2025
796a557
Only need to scan core jar
Vlatombe Jan 31, 2025
326da6b
remove commons-codec usage from core
mawinter69 Jan 24, 2025
bee9422
Merge branch 'master' into new-header
janfaracik Feb 1, 2025
19b4f27
Revert "Update with HeaderAction"
janfaracik Feb 1, 2025
0875038
Tidy
janfaracik Feb 1, 2025
a9c648d
Update RootAction.java
janfaracik Feb 1, 2025
9feda44
Update _breadcrumbs.scss
janfaracik Feb 1, 2025
56a808f
Push
janfaracik Feb 1, 2025
85be6b6
Removed obsolete spotbugs exclusion (#10224)
krisstern Feb 1, 2025
025a596
Update _header.scss
janfaracik Feb 1, 2025
1e67e70
Update _header.scss
janfaracik Feb 1, 2025
4a60bb7
Fix invisible actions not actually being invisible, make avatar huge …
janfaracik Feb 1, 2025
4a3f71a
Tidy
janfaracik Feb 1, 2025
abdb235
Push
janfaracik Feb 1, 2025
950cdee
Fix breadcrumbs + notification
janfaracik Feb 2, 2025
dc14c6d
remove commons-codec usage from core (#10228)
krisstern Feb 2, 2025
5b446f3
Remove `robust-http-client` (#10190)
krisstern Feb 2, 2025
5bd87dc
Update jumplist.jelly
janfaracik Feb 2, 2025
ef847c9
Getting there 🚀
janfaracik Feb 2, 2025
49cb8cc
WB
janfaracik Feb 2, 2025
18677f1
Update index.jelly
janfaracik Feb 3, 2025
eed89b7
Update headerContent.jelly
janfaracik Feb 3, 2025
c6324ca
Responsive
janfaracik Feb 3, 2025
76b9bcf
Push
janfaracik Feb 3, 2025
857885c
Push
janfaracik Feb 3, 2025
6752284
Push
janfaracik Feb 3, 2025
062636c
Update index.js
janfaracik Feb 3, 2025
d586b51
Push
janfaracik Feb 3, 2025
e2d75a5
Tidy up
janfaracik Feb 3, 2025
4a2cd7e
Tidy up
janfaracik Feb 3, 2025
668871b
Tidy
janfaracik Feb 3, 2025
575632f
Update logo.jelly
janfaracik Feb 3, 2025
a222707
Delete NewHeaderUserExperimentalFlag.java
janfaracik Feb 3, 2025
349b6cc
Update dependency io.jenkins.plugins:design-library to v355 (#10229)
renovate[bot] Feb 3, 2025
4178127
Update dependency io.jenkins.plugins:gson-api to v2.12.1-113.v347686d…
renovate[bot] Feb 3, 2025
7a7f056
[JENKINS-58743] Allow to provide a custom path for master key
Vlatombe Jan 31, 2025
5748d31
Spotless
Vlatombe Feb 4, 2025
11d1fa7
Better document lib.hudson.widget-refresh
daniel-beck Feb 4, 2025
484a617
[maven-release-plugin] prepare release jenkins-2.496
jenkins-release-bot Feb 4, 2025
630b6b6
[maven-release-plugin] prepare for next development iteration
jenkins-release-bot Feb 4, 2025
14c6a25
`CronTab.floor` / `.ceil` should return times at minute granularity
jglick Feb 4, 2025
6c16c34
Rename system properties
Vlatombe Feb 5, 2025
047e875
Fail fast if the confidential store can't be loaded
Vlatombe Feb 5, 2025
092756b
Update dependency io.jenkins.plugins:checks-api to v2.2.2 (#10241)
renovate[bot] Feb 5, 2025
7a52a93
Merge branch 'master' of https://github.com/jenkinsci/jenkins into fl…
jglick Feb 5, 2025
832ba1d
More stable date formatting https://github.com/jenkinsci/jenkins/pull…
jglick Feb 5, 2025
314930c
[JENKINS-58743] Allow to provide a custom path for master key (#10235)
krisstern Feb 6, 2025
d99855d
Web fragments (attempt #2) (#10227)
krisstern Feb 6, 2025
a8a8af7
Merge branch 'master' into new-header
janfaracik Feb 6, 2025
def576a
Lint
janfaracik Feb 6, 2025
6066472
Update index.js
janfaracik Feb 6, 2025
32ac982
Update index.js
janfaracik Feb 6, 2025
9e8794c
Update dependency org.jenkins-ci.plugins:credentials to v1408 (#10244)
renovate[bot] Feb 6, 2025
bad86cc
Update dependency org.jenkins-ci.modules:sshd to v3.350.v1080103a_10f…
renovate[bot] Feb 6, 2025
e8903b8
Fix some tests
janfaracik Feb 6, 2025
531e1b8
Update headerContent.jelly
janfaracik Feb 6, 2025
540ae4b
Update headerContent.jelly
janfaracik Feb 6, 2025
770f5d9
Remove bravo test - need to confirm this
janfaracik Feb 6, 2025
615e5a0
Update Security3349Test.java
janfaracik Feb 6, 2025
4f18521
Update Plugin count (#10246)
NotMyFault Feb 7, 2025
ff33e12
Update pom.xml
janfaracik Feb 7, 2025
3b3c41c
Remove comment due to duplicate declaration warning
daniel-beck Feb 7, 2025
a68c9a1
Merge branch 'master' into document-widget-refresh
krisstern Feb 7, 2025
e89f74a
Merge branch 'master' into new-header
janfaracik Feb 7, 2025
90dd49f
Fix SpotBugs + i18n
janfaracik Feb 8, 2025
c493a41
Add doc for header scroll, support prefers contrast
janfaracik Feb 8, 2025
cadf01e
Add overflow menu for actions, improve accessibility
janfaracik Feb 8, 2025
f740741
Update actions-overflow.js
janfaracik Feb 8, 2025
dbb67ca
Fix tests + accessibility
janfaracik Feb 8, 2025
6fd9121
Update dependency org.jenkins-ci.plugins.workflow:workflow-support to…
renovate[bot] Feb 8, 2025
f8c9f37
Update dependency org.jenkins-ci.plugins:apache-httpcomponents-client…
renovate[bot] Feb 8, 2025
e61ecca
Migrate from deprecated EE 8 methods to non-deprecated equivalents (#…
basil Feb 8, 2025
72d2b7b
Split one test into two in MarkupTextTest (#10226)
Rian-Ismael Feb 8, 2025
2fdb00b
Merge branch 'master' into new-header
janfaracik Feb 8, 2025
f5bbd10
Better document `lib.hudson.widget-refresh` (#10237)
krisstern Feb 9, 2025
1e89d00
`CronTab.floor` / `.ceil` should return times at minute granularity (…
krisstern Feb 9, 2025
e34bdcf
Update dependency sass to v1.84.0 (#10250)
renovate[bot] Feb 9, 2025
8eda9d1
Fix JS
janfaracik Feb 10, 2025
39b7f02
Update dependency org.jenkins-ci.plugins:junit to v1314 (#10248)
renovate[bot] Feb 10, 2025
44d352b
Update dependency commons-logging:commons-logging to v1.3.5 (#10249)
renovate[bot] Feb 10, 2025
4f98bd5
Update eslint monorepo to v9.20.0 (#10255)
renovate[bot] Feb 11, 2025
d9679d1
Update dependency org.jenkins-ci.plugins:script-security to v1373 (#1…
renovate[bot] Feb 11, 2025
768def7
Update dependency org.jenkins-ci.modules:sshd to v3.353.v2b_d33c46e97…
renovate[bot] Feb 11, 2025
08530c5
[maven-release-plugin] prepare release jenkins-2.497
jenkins-release-bot Feb 11, 2025
848ac9b
[maven-release-plugin] prepare for next development iteration
jenkins-release-bot Feb 11, 2025
57e67af
Update breadcrumbs-overflow.js
janfaracik Feb 11, 2025
14288b1
Update stapler.version to v1948 (major) (#10257)
renovate[bot] Feb 11, 2025
c9ce210
Update babel monorepo to v7.26.8 (#10256)
renovate[bot] Feb 11, 2025
ddc968a
Merge branch 'master' into new-header
janfaracik Feb 11, 2025
9474c89
Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.982.v…
renovate[bot] Feb 11, 2025
1f8cc8b
Update breadcrumbs-overflow.js
janfaracik Feb 12, 2025
ee5c7fe
Merge branch 'master' into new-header
janfaracik Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![Gitter](https://img.shields.io/gitter/room/jenkinsci/jenkins)](https://app.gitter.im/#/room/#jenkinsci_jenkins:gitter.im)

In a nutshell, Jenkins is the leading open-source automation server.
Built with Java, it provides over 1,800 [plugins](https://plugins.jenkins.io/) to support automating virtually anything,
Built with Java, it provides over 2,000 [plugins](https://plugins.jenkins.io/) to support automating virtually anything,
so that humans can spend their time doing things machines cannot.

# What to Use Jenkins for and When to Use It
Expand Down
9 changes: 2 additions & 7 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ THE SOFTWARE.
<commons-fileupload2.version>2.0.0-M2</commons-fileupload2.version>
<groovy.version>2.4.21</groovy.version>
<jelly.version>1.1-jenkins-20250108</jelly.version>
<stapler.version>1942.v708e07325402</stapler.version>
<stapler.version>1948.v0f99403fe86a_</stapler.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -287,11 +287,6 @@ THE SOFTWARE.
<artifactId>localizer</artifactId>
<version>1.31</version>
</dependency>
<dependency>
<groupId>org.jvnet.robust-http-client</groupId>
<artifactId>robust-http-client</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jvnet.winp</groupId>
<artifactId>winp</artifactId>
Expand Down Expand Up @@ -342,7 +337,7 @@ THE SOFTWARE.
<!-- provided by jcl-over-slf4j -->
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 0 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,6 @@ THE SOFTWARE.
<groupId>org.jvnet.localizer</groupId>
<artifactId>localizer</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.robust-http-client</groupId>
<artifactId>robust-http-client</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.winp</groupId>
<artifactId>winp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ public static String joinPath(String... components) {
*/
public static @CheckForNull String getConsoleUrl(WithConsoleUrl withConsoleUrl) {
String consoleUrl = withConsoleUrl.getConsoleUrl();
return consoleUrl != null ? Stapler.getCurrentRequest().getContextPath() + '/' + consoleUrl : null;
return consoleUrl != null ? Stapler.getCurrentRequest2().getContextPath() + '/' + consoleUrl : null;
}

/**
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/hudson/ProxyConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import jenkins.util.JenkinsJVM;
import jenkins.util.SystemProperties;
import org.jenkinsci.Symbol;
import org.jvnet.robust_http_client.RetryableHttpStream;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundConstructor;
Expand Down Expand Up @@ -346,10 +345,10 @@ public static URLConnection open(URL url) throws IOException {
public static InputStream getInputStream(URL url) throws IOException {
final ProxyConfiguration p = get();
if (p == null)
return new RetryableHttpStream(url);
return ((HttpURLConnection) url.openConnection()).getInputStream();

Proxy proxy = p.createProxy(url.getHost());
InputStream is = new RetryableHttpStream(url, proxy);
InputStream is = ((HttpURLConnection) url.openConnection(proxy)).getInputStream();
if (p.getUserName() != null) {
// Add an authenticator which provides the credentials for proxy authentication
Authenticator.setDefault(p.authenticator);
Expand Down
29 changes: 13 additions & 16 deletions core/src/main/java/hudson/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
import java.util.Collections;
import java.util.Date;
import java.util.EnumSet;
import java.util.HexFormat;
import java.util.List;
import java.util.Locale;
import java.util.Map;
Expand All @@ -115,7 +116,6 @@
import jenkins.util.MemoryReductionUtil;
import jenkins.util.SystemProperties;
import jenkins.util.io.PathRemover;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.time.FastDateFormat;
import org.apache.tools.ant.BuildException;
Expand Down Expand Up @@ -635,7 +635,6 @@ public static String ensureEndsWith(@CheckForNull String subject, @CheckForNull
* The stream will be closed by this method at the end of this method.
* @return
* 32-char wide string
* @see DigestUtils#md5Hex(InputStream)
*/
@NonNull
public static String getDigestOf(@NonNull InputStream source) throws IOException {
Expand Down Expand Up @@ -710,13 +709,7 @@ public static SecretKey toAes128Key(@NonNull String s) {

@NonNull
public static String toHexString(@NonNull byte[] data, int start, int len) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < len; i++) {
int b = data[start + i] & 0xFF;
if (b < 16) buf.append('0');
buf.append(Integer.toHexString(b));
}
return buf.toString();
return HexFormat.of().formatHex(data, start, len);
}

@NonNull
Expand All @@ -726,12 +719,7 @@ public static String toHexString(@NonNull byte[] bytes) {

@NonNull
public static byte[] fromHexString(@NonNull String data) {
if (data.length() % 2 != 0)
throw new IllegalArgumentException("data must have an even number of hexadecimal digits");
byte[] r = new byte[data.length() / 2];
for (int i = 0; i < data.length(); i += 2)
r[i / 2] = (byte) Integer.parseInt(data.substring(i, i + 2), 16);
return r;
return HexFormat.of().parseHex(data);
}

/**
Expand Down Expand Up @@ -1992,9 +1980,18 @@ public static byte[] getSHA256DigestOf(@NonNull byte[] input) {
* Returns Hex string of SHA-256 Digest of passed input
*/
@Restricted(NoExternalUse.class)
public static String getHexOfSHA256DigestOf(byte[] input) throws IOException {
public static String getHexOfSHA256DigestOf(byte[] input) {
//get hex string of sha 256 of payload
byte[] payloadDigest = Util.getSHA256DigestOf(input);
return (payloadDigest != null) ? Util.toHexString(payloadDigest) : null;
}


/**
* Returns Hex string of SHA-256 Digest of passed string
*/
@Restricted(NoExternalUse.class)
public static String getHexOfSHA256DigestOf(String input) {
return getHexOfSHA256DigestOf(input.getBytes(StandardCharsets.UTF_8));
}
}
33 changes: 31 additions & 2 deletions core/src/main/java/hudson/model/ManageJenkinsAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
import hudson.Extension;
import hudson.Util;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.Optional;
import jenkins.management.AdministrativeMonitorsDecorator;
import jenkins.management.Badge;
import jenkins.model.Jenkins;
import jenkins.model.ModelObjectWithContextMenu;
Expand All @@ -40,11 +44,11 @@
import org.kohsuke.stapler.StaplerResponse2;

/**
* Adds the "Manage Jenkins" link to the top page.
* Adds the "Manage Jenkins" link to the navigation bar.
*
* @author Kohsuke Kawaguchi
*/
@Extension(ordinal = 100) @Symbol("manageJenkins")
@Extension(ordinal = 998) @Symbol("manageJenkins")
public class ManageJenkinsAction implements RootAction, StaplerFallback, ModelObjectWithContextMenu {
@Override
public String getIconFileName() {
Expand Down Expand Up @@ -88,4 +92,29 @@ public void addContextMenuItem(ContextMenu menu, String url, String icon, String
// If neither is the case, rewrite the relative URL to point to inside the /manage/ URL space
menu.add("manage/" + url, icon, iconXml, text, post, requiresConfirmation, badge, message);
}

@Override
public Badge getBadge() {
Jenkins jenkins = Jenkins.get();
AdministrativeMonitorsDecorator decorator = jenkins.getExtensionList(PageDecorator.class)
.get(AdministrativeMonitorsDecorator.class);

if (decorator == null) {
return null;
}

Collection<AdministrativeMonitor> activeAdministrativeMonitors = Optional.ofNullable(decorator.getMonitorsToDisplay()).orElse(Collections.emptyList());
boolean anySecurity = activeAdministrativeMonitors.stream().anyMatch(AdministrativeMonitor::isSecurity);

if (activeAdministrativeMonitors.isEmpty()) {
return null;
}

int size = activeAdministrativeMonitors.size();
String tooltip = size > 1 ? Messages.ManageJenkinsAction_notifications(size) : Messages.ManageJenkinsAction_notification(size);

return new Badge(String.valueOf(size),
tooltip,
anySecurity ? Badge.Severity.DANGER : Badge.Severity.WARNING);
}
}
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/MyViewsProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public MyViewsTabBar getMyViewsTabBar() {
return Jenkins.get().getMyViewsTabBar();
}

@Extension @Symbol("myView")
@Symbol("myView")
public static class GlobalAction implements RootAction {

@Override
Expand Down
12 changes: 12 additions & 0 deletions core/src/main/java/hudson/model/RootAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@

package hudson.model;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import hudson.Extension;
import hudson.ExtensionPoint;
import jenkins.management.Badge;

/**
* Marker interface for actions that are added to {@link jenkins.model.Jenkins}.
Expand All @@ -38,4 +40,14 @@
* @since 1.311
*/
public interface RootAction extends Action, ExtensionPoint {

/**
* A {@link Badge} shown on the button for the action.
*
* @return badge or {@code null} if no badge should be shown.
* @since TODO
*/
default @CheckForNull Badge getBadge() {
return null;
}
}
7 changes: 7 additions & 0 deletions core/src/main/java/hudson/scheduler/CronTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ public Calendar ceil(long t) {
* (e.g. Jun 31) date, or at least a date too rare to be useful. This addresses JENKINS-41864 and was added in 2.49
*/
public Calendar ceil(Calendar cal) {
if (cal.get(Calendar.SECOND) > 0 || cal.get(Calendar.MILLISECOND) > 0) {
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
cal.add(Calendar.MINUTE, 1);
}
Calendar twoYearsFuture = (Calendar) cal.clone();
twoYearsFuture.add(Calendar.YEAR, 2);
OUTER:
Expand Down Expand Up @@ -440,6 +445,8 @@ public Calendar floor(long t) {
* (e.g. Jun 31) date, or at least a date too rare to be useful. This addresses JENKINS-41864 and was added in 2.49
*/
public Calendar floor(Calendar cal) {
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
Calendar twoYearsAgo = (Calendar) cal.clone();
twoYearsAgo.add(Calendar.YEAR, -2);

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/console/ConsoleUrlProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ default Descriptor<ConsoleUrlProvider> getDescriptor() {
* @return the URL for the console for the specified build, relative to the web server root
*/
static @NonNull String getRedirectUrl(Run<?, ?> run) {
return Stapler.getCurrentRequest().getContextPath() + '/' + run.getConsoleUrl();
return Stapler.getCurrentRequest2().getContextPath() + '/' + run.getConsoleUrl();
}

static List<ConsoleUrlProvider> all() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import hudson.Extension;
import hudson.diagnosis.ReverseProxySetupMonitor;
import hudson.model.AdministrativeMonitor;
import hudson.model.ManageJenkinsAction;
import hudson.model.PageDecorator;
import hudson.util.HudsonIsLoading;
import hudson.util.HudsonIsRestarting;
Expand Down Expand Up @@ -56,9 +55,6 @@ public class AdministrativeMonitorsDecorator extends PageDecorator {
public AdministrativeMonitorsDecorator() {
// otherwise this would be added to every internal context menu building request
ignoredJenkinsRestOfUrls.add("contextMenu");

// don't show here to allow admins to disable malfunctioning monitors via AdministrativeMonitorsDecorator
ignoredJenkinsRestOfUrls.add("configure");
}

@NonNull
Expand Down Expand Up @@ -163,11 +159,6 @@ public Collection<AdministrativeMonitor> getMonitorsToDisplay() {
return null;
}

// Don't show on Manage Jenkins
if (o instanceof ManageJenkinsAction) {
return null;
}

// don't show for some URLs served directly by Jenkins
if (o instanceof Jenkins) {
String url = a.getRestOfUrl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

/**
* Configures check interval for computer retention.
Expand Down Expand Up @@ -56,7 +56,7 @@ private void setComputerRetentionCheckInterval(int interval) throws IllegalArgum
}

@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
try {
final int interval = json.getInt("computerRetentionCheckInterval");
setComputerRetentionCheckInterval(interval);
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/model/GlobalConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String getGlobalConfigPage() {
@Override
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
if (Util.isOverridden(GlobalConfiguration.class, getClass(), "configure", StaplerRequest.class, JSONObject.class)) {
return configure(StaplerRequest.fromStaplerRequest2(req), json);
return configure(req != null ? StaplerRequest.fromStaplerRequest2(req) : null, json);
} else {
return configureImpl(req, json);
}
Expand Down
5 changes: 4 additions & 1 deletion core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,9 @@ protected Jenkins(File root, ServletContext context, PluginManager pluginManager
ClassFilterImpl.register();
LOGGER.info("Starting version " + getVersion());

// Sanity check that we can load the confidential store. Fail fast if we can't.
ConfidentialStore.get();

// initialization consists of ...
executeReactor(is,
pluginManager.initTasks(is), // loading and preparing plugins
Expand Down Expand Up @@ -2347,7 +2350,7 @@ public String getSearchUrl() {
public SearchIndexBuilder makeSearchIndex() {
SearchIndexBuilder builder = super.makeSearchIndex();

this.actions.stream().filter(e -> e.getIconFileName() != null).forEach(action -> builder.add(new SearchItem() {
this.actions.stream().filter(e -> !(e.getIconFileName() == null || e.getUrlName() == null)).forEach(action -> builder.add(new SearchItem() {
@Override
public String getSearchName() {
return action.getDisplayName();
Expand Down
Loading