Skip to content

Commit

Permalink
Merge branch 'master' into update-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jan 27, 2022
2 parents 7540afd + 50a4702 commit dc2e683
Show file tree
Hide file tree
Showing 274 changed files with 108 additions and 55 deletions.
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ THE SOFTWARE.

<properties>
<asm.version>9.2</asm.version>
<slf4jVersion>1.7.33</slf4jVersion>
<stapler.version>1638.v229a_24fa_b_17c</stapler.version>
<slf4jVersion>1.7.35</slf4jVersion>
<stapler.version>1642.ve454c4518974</stapler.version>
<groovy.version>2.4.21</groovy.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/AboutJenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class AboutJenkins extends ManagementLink {
@Override
public String getIconFileName() {
return "help.png";
return "help.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/diagnosis/OldDataMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public Category getCategory() {

@Override
public String getIconFileName() {
return "document.png";
return "document.svg";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private WindowsInstallerLink(File jenkinsWar) {

@Override
public String getIconFileName() {
return "installer.gif";
return "installer.svg";
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/hudson/model/Computer.java
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,10 @@ public void setTemporarilyOffline(boolean temporarilyOffline, OfflineCause cause
@Exported
public String getIcon() {
// The machine was taken offline by someone
if (isTemporarilyOffline() && getOfflineCause() instanceof OfflineCause.UserCause) return "computer-user-offline.png";
if (isTemporarilyOffline() && getOfflineCause() instanceof OfflineCause.UserCause) return "computer-user-offline.svg";
// There is a "technical" reason the computer will not accept new builds
if (isOffline() || !isAcceptingTasks()) return "computer-x.png";
return "computer.png";
if (isOffline() || !isAcceptingTasks()) return "computer-x.svg";
return "computer.svg";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/Descriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.jvnet.tiger_types.Types;
import org.kohsuke.stapler.Ancestor;
import org.kohsuke.stapler.BindInterceptor;
Expand All @@ -91,7 +92,6 @@
import org.kohsuke.stapler.WebApp;
import org.kohsuke.stapler.jelly.JellyCompatibleFacet;
import org.kohsuke.stapler.lang.Klass;
import org.springframework.util.StringUtils;

/**
* Metadata about a configurable instance.
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/hudson/model/ManagementLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action {

/**
* Mostly works like {@link Action#getIconFileName()}, except that
* the expected icon size is 48x48, not 24x24. So if you give
* just a file name, "/images/48x48" will be assumed.
* the expected icon format is SVG. So if you give just a file name, "/images/svgs" will be assumed.
*
* @return
* As a special case, return null to exclude this object from the management link.
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/hudson/model/RunMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import jenkins.model.lazy.AbstractLazyLoadRunMap;
import jenkins.model.lazy.BuildReference;
import jenkins.model.lazy.LazyBuildMixIn;
import org.apache.commons.collections.comparators.ReverseComparator;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

Expand Down Expand Up @@ -160,7 +159,7 @@ public R oldestValue() {

/**
* @deprecated as of 1.485
* Use {@link ReverseComparator}
* Use {@link Comparator#reverseOrder}
*/
@Deprecated
public static final Comparator<Comparable> COMPARATOR = Comparator.reverseOrder();
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/View.java
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ public AsynchPeople(View parent) {
JSONObject entry = new JSONObject().
accumulate("id", u.getId()).
accumulate("fullName", u.getFullName()).
accumulate("url", u.getUrl()).
accumulate("url", u.getUrl() + "/").
accumulate("avatar", i.avatar != null ? i.avatar : Stapler.getCurrentRequest().getContextPath() + Functions.getResourcePath() + "/images/svgs/person.svg").
accumulate("timeSortKey", i.getTimeSortKey()).
accumulate("lastChangeTimeString", i.getLastChangeTimeString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public String getDescription() {

@Override
public String getIconFileName() {
return "secure.png";
return "secure.svg";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ public static final class ManageUserLinks extends ManagementLink {
@Override
public String getIconFileName() {
if (Jenkins.get().getSecurityRealm() instanceof HudsonPrivateSecurityRealm)
return "user.png";
return "user.svg";
else
return null; // not applicable now
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/util/FormValidation.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
import javax.servlet.ServletException;
import jenkins.model.Jenkins;
import jenkins.util.SystemProperties;
import org.apache.commons.lang.StringUtils;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.springframework.util.StringUtils;

/**
* Represents the result of the form field validation.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/CliLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class CliLink extends ManagementLink {

@Override
public String getIconFileName() {
return "terminal.png";
return "terminal.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/ConfigureLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ConfigureLink extends ManagementLink {

@Override
public String getIconFileName() {
return "gear2.png";
return "gear.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/ConsoleLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ConsoleLink extends ManagementLink {

@Override
public String getIconFileName() {
return "notepad.png";
return "notepad.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/NodesLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class NodesLink extends ManagementLink {

@Override
public String getIconFileName() {
return "network.png";
return "network.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/PluginsLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class PluginsLink extends ManagementLink {

@Override
public String getIconFileName() {
return "plugin.png";
return "plugin.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/ReloadLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ReloadLink extends ManagementLink {

@Override
public String getIconFileName() {
return "refresh.png";
return "refresh.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/ShutdownLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ShutdownLink extends ManagementLink {

@Override
public String getIconFileName() {
return "system-log-out.png";
return "system-log-out.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/StatisticsLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class StatisticsLink extends ManagementLink {

@Override
public String getIconFileName() {
return "monitor.png";
return "monitor.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/SystemInfoLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class SystemInfoLink extends ManagementLink {

@Override
public String getIconFileName() {
return "computer.png";
return "computer.svg";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/management/SystemLogLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class SystemLogLink extends ManagementLink {

@Override
public String getIconFileName() {
return "clipboard.png";
return "clipboard.svg";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public ContextMenu add(Node n) {
Computer c = n.toComputer();
return add(new MenuItem()
.withDisplayName(n.getDisplayName())
.withIconClass(c == null ? "icon-computer" : c.getIconClassName())
.withStockIcon(c == null ? "computer.svg" : c.getIcon())
.withContextRelativeUrl(n.getSearchUrl()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import net.sf.json.JSONObject;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.StaplerRequest;

/**
Expand All @@ -64,6 +65,11 @@ public Set<String> getIgnoredWarnings() {
return Collections.unmodifiableSet(ignoredWarnings);
}

@DataBoundSetter // unused; for CasC support only
public void setIgnoredWarnings(Set<String> ignoredWarnings) {
this.ignoredWarnings = new HashSet<>(ignoredWarnings);
}

public boolean isIgnored(@NonNull UpdateSite.Warning warning) {
return ignoredWarnings.contains(warning.id);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class GlobalToolConfiguration extends ManagementLink {

@Override
public String getIconFileName() {
return "setting.png";
return "setting.svg";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ THE SOFTWARE.
${%No files in directory}
<j:if test="${showSymlinkWarning}">
<p>
<img id="symlinkalert" src="${imagesURL}/16x16/warning.png"/>
<img id="symlinkalert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" />
${%Symlinks are hidden}
</p>
</j:if>
Expand Down Expand Up @@ -114,7 +114,7 @@ THE SOFTWARE.
</table>
<j:if test="${showSymlinkWarning}">
<p>
<img id="alert" src="${imagesURL}/16x16/warning.png"/>
<img id="alert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" />
${%Symlinks are hidden}
</p>
</j:if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ THE SOFTWARE.
<l:main-panel>

<h1>
<img src="${imagesURL}/48x48/${it.icon}" width="48" height="48" alt=""/>
<img src="${imagesURL}/svgs/${it.icon}" width="48" height="48" alt=""/>
${it.caption} ${%System Information}
<j:if test="${!empty(it.node.nodeDescription)}">
<span style="font-size:smaller">(${it.node.nodeDescription})</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
{ "name": "email-ext", "suggested": true },
{ "name": "emailext-template" },
{ "name": "mailer", "suggested": true },
{ "name": "publish-over-ssh" },
{ "name": "ssh" }
]
},
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/jenkins/model/Jenkins/manage.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ THE SOFTWARE.

<j:if test="${icon!=null}">
<div class="jenkins-section__item">
<j:set var="iconUrl" value="${icon.startsWith('/') ? resURL+icon : imagesURL + '/48x48/' + icon}" />
<j:set var="iconUrl" value="${icon.startsWith('/') ? resURL+icon : imagesURL + '/svgs/' + icon}" />
<j:set var="alt" value="${icon.replaceAll('\\d*\\.[^.]+$', '')}"/>
${taskTags!=null and attrs.contextMenu!='false' ? taskTags.add(m.urlName, iconUrl, m.displayName, m.requiresPOST, m.requiresConfirmation) : null}
<j:choose>
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/resources/lib/form/entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ THE SOFTWARE.
<j:when test="${possiblyEscapedTitle!=null}">
<div class="jenkins-form-label help-sibling">
<j:out value="${possiblyEscapedTitle}" />
<f:helpLink url="${attrs.help}" featureName="${title}"/>
<f:helpLink url="${attrs.help}" featureName="${attrs.title}"/>
</div>
<j:if test="${!empty(attrs.description)}">
<f:description>
Expand All @@ -98,7 +98,7 @@ THE SOFTWARE.
<j:otherwise>
<div class="setting-main help-sibling">
<d:invokeBody />
<f:helpLink url="${attrs.help}" featureName="${title}"/>
<f:helpLink url="${attrs.help}" featureName="${attrs.title}"/>
</div>
<!-- used to display the form validation error -->
<div class="validation-error-area tr"><div colspan="2"></div><div></div><div></div></div>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/hudson/executors.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ THE SOFTWARE.
<st:nbsp/>
<j:choose>
<j:when test="${c.offlineCause!=null and !c.connecting}">
(<l:icon class="icon-error icon-sm" title="${c.offlineCause}"/> ${%offline})
(<img src="${imagesURL}/svgs/error.svg" width="16" height="16" title="${c.offlineCause}"/> ${%offline})
</j:when>
<j:when test="${c.connecting}">
(<l:icon class="icon-hourglass icon-sm"/>${%launching})
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/resources/lib/hudson/scriptConsole.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ THE SOFTWARE.
<l:main-panel>
<j:choose>
<j:when test="${it.icon == null}">
<j:set var="icon" value="notepad.png"/>
<j:set var="icon" value="notepad.svg"/>
</j:when>
<j:otherwise>
<j:set var="icon" value="${it.icon}"/>
</j:otherwise>
</j:choose>
<h1><img src="${imagesURL}/48x48/${icon}" width="48" height="48" alt=""/> ${%Script Console}</h1>
<h1><img src="${imagesURL}/svgs/${icon}" width="48" height="48" alt=""/> ${%Script Console}</h1>

<j:choose>
<j:when test="${it.channel != null}">
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ THE SOFTWARE.
</issueManagement>

<properties>
<revision>2.332</revision>
<revision>2.333</revision>
<changelist>-SNAPSHOT</changelist>

<!-- *.html files are in UTF-8, and *.properties are in iso-8859-1, so this configuration is actually incorrect,
Expand Down Expand Up @@ -101,7 +101,7 @@ THE SOFTWARE.
<access-modifier.version>1.27</access-modifier.version>
<bridge-method-injector.version>1.23</bridge-method-injector.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<mockito.version>4.2.0</mockito.version>
<mockito.version>4.3.1</mockito.version>
<spotless.version>2.20.0</spotless.version>
</properties>

Expand Down Expand Up @@ -456,8 +456,8 @@ THE SOFTWARE.
<property name="separateLineBetweenGroups" value="true" />
</module>
<module name="IllegalImport">
<!-- prevent the use of jsr-305 annotations -->
<property name="illegalClasses" value="javax.annotation.MatchesPattern.Checker, javax.annotation.Nonnegative.Checker, javax.annotation.Nonnull.Checker, javax.annotation.RegEx.Checker, javax.annotation.CheckForNull, javax.annotation.CheckForSigned, javax.annotation.CheckReturnValue, javax.annotation.Detainted, javax.annotation.MatchesPattern, javax.annotation.Nonnegative, javax.annotation.Nonnull, javax.annotation.Nullable, javax.annotation.OverridingMethodsMustInvokeSuper, javax.annotation.ParametersAreNonnullByDefault, javax.annotation.ParametersAreNullableByDefault, javax.annotation.PropertyKey, javax.annotation.RegEx, javax.annotation.Signed, javax.annotation.Syntax, javax.annotation.Tainted, javax.annotation.Untainted, javax.annotation.WillClose, javax.annotation.WillCloseWhenClosed, javax.annotation.WillNotClose, javax.annotation.concurrent.GuardedBy, javax.annotation.concurrent.Immutable, javax.annotation.concurrent.NotThreadSafe, javax.annotation.concurrent.ThreadSafe, javax.annotation.meta.TypeQualifierValidator, javax.annotation.meta.When, javax.annotation.meta.Exclusive, javax.annotation.meta.Exhaustive, javax.annotation.meta.TypeQualifier, javax.annotation.meta.TypeQualifierDefault, javax.annotation.meta.TypeQualifierNickname" />
<!-- prevent the use of jsr-305 annotations and Spring utilities -->
<property name="illegalClasses" value="javax.annotation.MatchesPattern.Checker, javax.annotation.Nonnegative.Checker, javax.annotation.Nonnull.Checker, javax.annotation.RegEx.Checker, javax.annotation.CheckForNull, javax.annotation.CheckForSigned, javax.annotation.CheckReturnValue, javax.annotation.Detainted, javax.annotation.MatchesPattern, javax.annotation.Nonnegative, javax.annotation.Nonnull, javax.annotation.Nullable, javax.annotation.OverridingMethodsMustInvokeSuper, javax.annotation.ParametersAreNonnullByDefault, javax.annotation.ParametersAreNullableByDefault, javax.annotation.PropertyKey, javax.annotation.RegEx, javax.annotation.Signed, javax.annotation.Syntax, javax.annotation.Tainted, javax.annotation.Untainted, javax.annotation.WillClose, javax.annotation.WillCloseWhenClosed, javax.annotation.WillNotClose, javax.annotation.concurrent.GuardedBy, javax.annotation.concurrent.Immutable, javax.annotation.concurrent.NotThreadSafe, javax.annotation.concurrent.ThreadSafe, javax.annotation.meta.TypeQualifierValidator, javax.annotation.meta.When, javax.annotation.meta.Exclusive, javax.annotation.meta.Exhaustive, javax.annotation.meta.TypeQualifier, javax.annotation.meta.TypeQualifierDefault, javax.annotation.meta.TypeQualifierNickname, org.springframework.util.Assert, org.springframework.util.StringUtils" />
<!-- Prevent the expansion of Guava usages and ban internal library packages -->
<property name="illegalPkgs" value="com.google.common.base, com.google.common.escape, com.google.common.eventbus, com.google.common.graph, com.google.common.hash, com.google.common.html, com.google.common.io, com.google.common.math, com.google.common.net, com.google.common.primitives, com.google.common.reflect, com.google.common.xml, com.google.thirdparty, jline.internal" />
</module>
Expand Down
4 changes: 2 additions & 2 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ THE SOFTWARE.
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1682.v4a_71b_f124ca_3</version>
<version>1697.v6b_1e34cb_4ee6</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -130,7 +130,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-auth</artifactId>
<version>3.0</version>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Loading

0 comments on commit dc2e683

Please sign in to comment.