Skip to content

Commit

Permalink
Merge pull request #506 from mawinter69/ui-refresh
Browse files Browse the repository at this point in the history
UI renovation
  • Loading branch information
rsandell authored Mar 11, 2024
2 parents 20643d8 + c77cd6d commit 633df2b
Show file tree
Hide file tree
Showing 52 changed files with 1,274 additions and 41,108 deletions.
17 changes: 10 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</developers>

<properties>
<jenkins.version>2.414.3</jenkins.version>
<jenkins.version>2.426.3</jenkins.version>
<revision>2.39.5</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
Expand Down Expand Up @@ -115,6 +115,10 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>apache-httpcomponents-client-4-api</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>ionicons-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git</artifactId>
Expand Down Expand Up @@ -271,8 +275,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.414.x</artifactId>
<version>2675.v1515e14da_7a_6</version>
<artifactId>bom-2.426.x</artifactId>
<version>2815.vf5d6f093b_23e</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -300,7 +304,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
<forkCount>${concurrency}</forkCount>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -334,7 +337,7 @@
</execution>
</executions>
</plugin>
<plugin>
<!--plugin>
<groupId>com.googlecode.jslint4java</groupId>
<artifactId>jslint4java-maven-plugin</artifactId>
<version>2.0.5</version>
Expand All @@ -356,12 +359,12 @@
<unparam>true</unparam>
<plusplus>true</plusplus>
<devel>true</devel>
<predef>pluginURL,imagesURL,columnDefs,YAHOO</predef>
<predef>Behaviour,fetch</predef>
</options>
</configuration>
</execution>
</executions>
</plugin>
</plugin -->
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.sonymobile.tools.gerrit.gerritevents.GerritSendCommandQueue;
import hudson.DescriptorExtensionList;
import hudson.Extension;
import hudson.Functions;
import hudson.model.AdministrativeMonitor;
import hudson.model.AutoCompletionCandidates;
import hudson.model.Describable;
Expand Down Expand Up @@ -117,15 +116,18 @@ public ContextMenu doContextMenu(StaplerRequest request, StaplerResponse respons
checkPermission();
Jenkins jenkins = Jenkins.get();
ContextMenu menu = new ContextMenu();
menu.add("newServer", Functions.joinPath(jenkins.getRootUrl(), Functions.getResourcePath(),
"images", "24x24", "new-package.png"), Messages.AddNewServer());
MenuItem item = new MenuItem()
.withUrl("newServer")
.withDisplayName(Messages.AddNewServer())
.withIconClass("symbol-add-outline plugin-ionicons-api");
menu.add(item);
for (GerritServer server : getServers()) {
menu.add(server);
}
MenuItem item = new MenuItem()
item = new MenuItem()
.withUrl("diagnostics")
.withDisplayName(DIAGNOSTICS)
.withStockIcon("folder.png");
.withIconClass("symbol-folder-outline plugin-ionicons-api");
item.subMenu = DIAGNOSTICS.getContextMenu("diagnostics");
menu.add(item);
return menu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1314,19 +1314,6 @@ public FormValidation doPositiveIntegerCheck(
return FormValidation.validatePositiveInteger(value);
}

/**
* Checks that the provided parameter is an integer and not negative, zero is accepted.
*
* @param value the value.
* @return {@link FormValidation#validateNonNegativeInteger(String)}
*/
public FormValidation doNonNegativeIntegerCheck(
@QueryParameter("value")
final String value) {

return FormValidation.validateNonNegativeInteger(value);
}

/**
* Checks that the provided parameter is an integer, not negative, that is larger
* than the minimum value.
Expand Down Expand Up @@ -1367,27 +1354,6 @@ public FormValidation doIntegerCheck(
}
}

/**
* Checks that the provided parameter is an empty string or an integer.
* @param value the value.
* @return {@link FormValidation#validatePositiveInteger(String)}
*/
public FormValidation doEmptyOrIntegerCheck(
@QueryParameter("value")
final String value) {

if (value == null || value.length() <= 0) {
return FormValidation.ok();
} else {
try {
Integer.parseInt(value);
return FormValidation.ok();
} catch (NumberFormatException e) {
return FormValidation.error(Messages.NotANumber());
}
}
}

/**
* Checks if the value is a valid URL. It does not check if the URL is reachable.
* @param value the value
Expand Down Expand Up @@ -1437,14 +1403,14 @@ public FormValidation doValidKeyFileCheck(
* Checks to see if the provided value represents a time on the hh:mm format.
* Also checks that from is before to.
*
* @param fromValue the from value.
* @param toValue the to value.
* @param from the from value.
* @param to the to value.
* @return {@link FormValidation#ok() } if it is so.
*/
public FormValidation doValidTimeCheck(
@QueryParameter final String fromValue, @QueryParameter final String toValue) {
String[] splitFrom = fromValue.split(":");
String[] splitTo = toValue.split(":");
@QueryParameter final String from, @QueryParameter final String to) {
String[] splitFrom = from.split(":");
String[] splitTo = to.split(":");
int fromHour;
int fromMinute;
int toHour;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,20 @@ public ContextMenu getContextMenu(String context) {
String url = makeRelativeUrl(context, "buildMemory");
menu.add(new MenuItem()
.withUrl(url)
.withStockIcon("clipboard.png")
.withIconClass("symbol-clipboard-outline plugin-ionicons-api")
.withDisplayName(Messages.BuildMemoryReport_DisplayName()));
url = makeRelativeUrl(context, "eventListeners");
menu.add(new MenuItem()
.withUrl(url)
.withStockIcon("clipboard.png")
.withIconClass("symbol-clipboard-outline plugin-ionicons-api")
.withDisplayName(Messages.EventListenersReport_DisplayName()));
if (isDebugMode()) {
menu.add("triggerDebugEvent", "warning.png", "Trigger Debug", false, true);
MenuItem item = new MenuItem()
.withUrl("triggerDebugEvent")
.withIconClass("symbol-warning plugin-ionicons-api")
.withDisplayName("Trigger Debug");
item.requiresConfirmation = true;
menu.add(item);
}
return menu;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,6 @@ public boolean isUnsuccessfulMessageFileSupported(Job job) {
return job instanceof AbstractProject;
}

/**
* Checks that the provided parameter is an empty string or an integer.
*
* @param value the value.
* @return {@link FormValidation#validatePositiveInteger(String)}
*/
public FormValidation doEmptyOrIntegerCheck(
@QueryParameter("value")
final String value) {
if (value == null || value.length() <= 0) {
return FormValidation.ok();
} else {
try {
Integer.parseInt(value);
return FormValidation.ok();
} catch (NumberFormatException e) {
return FormValidation.error(Messages.NotANumber());
}
}
}

/**
* Provides auto-completion candidates for dependency jobs names.
*
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/META-INF/hudson.remoting.ClassFilter

This file was deleted.

Loading

0 comments on commit 633df2b

Please sign in to comment.