Skip to content

Commit 633df2b

Browse files
authored
Merge pull request #506 from mawinter69/ui-refresh
UI renovation
2 parents 20643d8 + c77cd6d commit 633df2b

File tree

52 files changed

+1274
-41108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1274
-41108
lines changed

pom.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</developers>
5555

5656
<properties>
57-
<jenkins.version>2.414.3</jenkins.version>
57+
<jenkins.version>2.426.3</jenkins.version>
5858
<revision>2.39.5</revision>
5959
<changelist>-SNAPSHOT</changelist>
6060
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
@@ -115,6 +115,10 @@
115115
<groupId>org.jenkins-ci.plugins</groupId>
116116
<artifactId>apache-httpcomponents-client-4-api</artifactId>
117117
</dependency>
118+
<dependency>
119+
<groupId>io.jenkins.plugins</groupId>
120+
<artifactId>ionicons-api</artifactId>
121+
</dependency>
118122
<dependency>
119123
<groupId>org.jenkins-ci.plugins</groupId>
120124
<artifactId>git</artifactId>
@@ -271,8 +275,8 @@
271275
<dependencies>
272276
<dependency>
273277
<groupId>io.jenkins.tools.bom</groupId>
274-
<artifactId>bom-2.414.x</artifactId>
275-
<version>2675.v1515e14da_7a_6</version>
278+
<artifactId>bom-2.426.x</artifactId>
279+
<version>2815.vf5d6f093b_23e</version>
276280
<type>pom</type>
277281
<scope>import</scope>
278282
</dependency>
@@ -300,7 +304,6 @@
300304
<artifactId>maven-surefire-plugin</artifactId>
301305
<configuration>
302306
<reuseForks>false</reuseForks>
303-
<forkCount>${concurrency}</forkCount>
304307
</configuration>
305308
</plugin>
306309
<plugin>
@@ -334,7 +337,7 @@
334337
</execution>
335338
</executions>
336339
</plugin>
337-
<plugin>
340+
<!--plugin>
338341
<groupId>com.googlecode.jslint4java</groupId>
339342
<artifactId>jslint4java-maven-plugin</artifactId>
340343
<version>2.0.5</version>
@@ -356,12 +359,12 @@
356359
<unparam>true</unparam>
357360
<plusplus>true</plusplus>
358361
<devel>true</devel>
359-
<predef>pluginURL,imagesURL,columnDefs,YAHOO</predef>
362+
<predef>Behaviour,fetch</predef>
360363
</options>
361364
</configuration>
362365
</execution>
363366
</executions>
364-
</plugin>
367+
</plugin -->
365368
</plugins>
366369
</build>
367370

src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritManagement.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import com.sonymobile.tools.gerrit.gerritevents.GerritSendCommandQueue;
3333
import hudson.DescriptorExtensionList;
3434
import hudson.Extension;
35-
import hudson.Functions;
3635
import hudson.model.AdministrativeMonitor;
3736
import hudson.model.AutoCompletionCandidates;
3837
import hudson.model.Describable;
@@ -117,15 +116,18 @@ public ContextMenu doContextMenu(StaplerRequest request, StaplerResponse respons
117116
checkPermission();
118117
Jenkins jenkins = Jenkins.get();
119118
ContextMenu menu = new ContextMenu();
120-
menu.add("newServer", Functions.joinPath(jenkins.getRootUrl(), Functions.getResourcePath(),
121-
"images", "24x24", "new-package.png"), Messages.AddNewServer());
119+
MenuItem item = new MenuItem()
120+
.withUrl("newServer")
121+
.withDisplayName(Messages.AddNewServer())
122+
.withIconClass("symbol-add-outline plugin-ionicons-api");
123+
menu.add(item);
122124
for (GerritServer server : getServers()) {
123125
menu.add(server);
124126
}
125-
MenuItem item = new MenuItem()
127+
item = new MenuItem()
126128
.withUrl("diagnostics")
127129
.withDisplayName(DIAGNOSTICS)
128-
.withStockIcon("folder.png");
130+
.withIconClass("symbol-folder-outline plugin-ionicons-api");
129131
item.subMenu = DIAGNOSTICS.getContextMenu("diagnostics");
130132
menu.add(item);
131133
return menu;

src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritServer.java

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,19 +1314,6 @@ public FormValidation doPositiveIntegerCheck(
13141314
return FormValidation.validatePositiveInteger(value);
13151315
}
13161316

1317-
/**
1318-
* Checks that the provided parameter is an integer and not negative, zero is accepted.
1319-
*
1320-
* @param value the value.
1321-
* @return {@link FormValidation#validateNonNegativeInteger(String)}
1322-
*/
1323-
public FormValidation doNonNegativeIntegerCheck(
1324-
@QueryParameter("value")
1325-
final String value) {
1326-
1327-
return FormValidation.validateNonNegativeInteger(value);
1328-
}
1329-
13301317
/**
13311318
* Checks that the provided parameter is an integer, not negative, that is larger
13321319
* than the minimum value.
@@ -1367,27 +1354,6 @@ public FormValidation doIntegerCheck(
13671354
}
13681355
}
13691356

1370-
/**
1371-
* Checks that the provided parameter is an empty string or an integer.
1372-
* @param value the value.
1373-
* @return {@link FormValidation#validatePositiveInteger(String)}
1374-
*/
1375-
public FormValidation doEmptyOrIntegerCheck(
1376-
@QueryParameter("value")
1377-
final String value) {
1378-
1379-
if (value == null || value.length() <= 0) {
1380-
return FormValidation.ok();
1381-
} else {
1382-
try {
1383-
Integer.parseInt(value);
1384-
return FormValidation.ok();
1385-
} catch (NumberFormatException e) {
1386-
return FormValidation.error(Messages.NotANumber());
1387-
}
1388-
}
1389-
}
1390-
13911357
/**
13921358
* Checks if the value is a valid URL. It does not check if the URL is reachable.
13931359
* @param value the value
@@ -1437,14 +1403,14 @@ public FormValidation doValidKeyFileCheck(
14371403
* Checks to see if the provided value represents a time on the hh:mm format.
14381404
* Also checks that from is before to.
14391405
*
1440-
* @param fromValue the from value.
1441-
* @param toValue the to value.
1406+
* @param from the from value.
1407+
* @param to the to value.
14421408
* @return {@link FormValidation#ok() } if it is so.
14431409
*/
14441410
public FormValidation doValidTimeCheck(
1445-
@QueryParameter final String fromValue, @QueryParameter final String toValue) {
1446-
String[] splitFrom = fromValue.split(":");
1447-
String[] splitTo = toValue.split(":");
1411+
@QueryParameter final String from, @QueryParameter final String to) {
1412+
String[] splitFrom = from.split(":");
1413+
String[] splitTo = to.split(":");
14481414
int fromHour;
14491415
int fromMinute;
14501416
int toHour;

src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/diagnostics/Diagnostics.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,20 @@ public ContextMenu getContextMenu(String context) {
8080
String url = makeRelativeUrl(context, "buildMemory");
8181
menu.add(new MenuItem()
8282
.withUrl(url)
83-
.withStockIcon("clipboard.png")
83+
.withIconClass("symbol-clipboard-outline plugin-ionicons-api")
8484
.withDisplayName(Messages.BuildMemoryReport_DisplayName()));
8585
url = makeRelativeUrl(context, "eventListeners");
8686
menu.add(new MenuItem()
8787
.withUrl(url)
88-
.withStockIcon("clipboard.png")
88+
.withIconClass("symbol-clipboard-outline plugin-ionicons-api")
8989
.withDisplayName(Messages.EventListenersReport_DisplayName()));
9090
if (isDebugMode()) {
91-
menu.add("triggerDebugEvent", "warning.png", "Trigger Debug", false, true);
91+
MenuItem item = new MenuItem()
92+
.withUrl("triggerDebugEvent")
93+
.withIconClass("symbol-warning plugin-ionicons-api")
94+
.withDisplayName("Trigger Debug");
95+
item.requiresConfirmation = true;
96+
menu.add(item);
9297
}
9398
return menu;
9499
}

src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTriggerDescriptor.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,6 @@ public boolean isUnsuccessfulMessageFileSupported(Job job) {
6363
return job instanceof AbstractProject;
6464
}
6565

66-
/**
67-
* Checks that the provided parameter is an empty string or an integer.
68-
*
69-
* @param value the value.
70-
* @return {@link FormValidation#validatePositiveInteger(String)}
71-
*/
72-
public FormValidation doEmptyOrIntegerCheck(
73-
@QueryParameter("value")
74-
final String value) {
75-
if (value == null || value.length() <= 0) {
76-
return FormValidation.ok();
77-
} else {
78-
try {
79-
Integer.parseInt(value);
80-
return FormValidation.ok();
81-
} catch (NumberFormatException e) {
82-
return FormValidation.error(Messages.NotANumber());
83-
}
84-
}
85-
}
86-
8766
/**
8867
* Provides auto-completion candidates for dependency jobs names.
8968
*

src/main/resources/META-INF/hudson.remoting.ClassFilter

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)