From 54ec271b75dad82da9bd4ee2975a22490d66d6dc Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 28 Dec 2012 16:39:13 +0100 Subject: o Showing date and build result IN COLOR! --- .../esper/testing/web/resource/CoreResource.java | 14 ++++++---- src/main/webapp/WEB-INF/tags/common/head.tagx | 1 + src/main/webapp/apps/app.js | 0 src/main/webapp/apps/personApp/person.html | 31 +++++++++++++++------- 4 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 src/main/webapp/apps/app.js (limited to 'src') diff --git a/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java b/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java index 98b32bb..2f4b77b 100644 --- a/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java +++ b/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java @@ -6,6 +6,7 @@ import io.trygvis.esper.testing.core.badge.*; import io.trygvis.esper.testing.core.db.*; import io.trygvis.esper.testing.util.sql.*; import io.trygvis.esper.testing.web.*; +import org.joda.time.*; import javax.servlet.http.*; import javax.ws.rs.*; @@ -98,10 +99,9 @@ public class CoreResource extends AbstractResource { public List run(Daos daos) throws SQLException { List buildDtos; - if(person != null) { + if (person != null) { buildDtos = daos.buildDao.selectBuildsByPerson(person, page); - } - else { + } else { buildDtos = daos.buildDao.selectBuilds(page); } @@ -130,14 +130,18 @@ public class CoreResource extends AbstractResource { } private BuildJson getBuildJson(Daos daos, BuildDto build) { - return new BuildJson(build.uuid); + return new BuildJson(build.uuid, build.createdDate, build.success); } public static class BuildJson { public final UUID uuid; + public final DateTime date; + public final boolean success; - public BuildJson(UUID uuid) { + public BuildJson(UUID uuid, DateTime date, boolean success) { this.uuid = uuid; + this.date = date; + this.success = success; } } } diff --git a/src/main/webapp/WEB-INF/tags/common/head.tagx b/src/main/webapp/WEB-INF/tags/common/head.tagx index 2384b20..f5b27a4 100644 --- a/src/main/webapp/WEB-INF/tags/common/head.tagx +++ b/src/main/webapp/WEB-INF/tags/common/head.tagx @@ -16,6 +16,7 @@