aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-29 15:56:48 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2012-12-29 15:56:48 +0100
commit1b83af30a4e935f2037a6e9153cb438c29adfbfc (patch)
tree4b885fe232512d3c4c22c99d004ce202ec7638f6
parentf39b6c813dfa8ad97de4f8a35aaf21ee1408b6d4 (diff)
downloadesper-testing-1b83af30a4e935f2037a6e9153cb438c29adfbfc.tar.gz
esper-testing-1b83af30a4e935f2037a6e9153cb438c29adfbfc.tar.bz2
esper-testing-1b83af30a4e935f2037a6e9153cb438c29adfbfc.tar.xz
esper-testing-1b83af30a4e935f2037a6e9153cb438c29adfbfc.zip
o Starting on a generic paging component.
o Showing recent jobs on the jenkins server page.
-rw-r--r--src/main/java/io/trygvis/esper/testing/core/badge/UnbreakablePoller.java2
-rw-r--r--src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java10
-rw-r--r--src/main/java/io/trygvis/esper/testing/jenkins/JenkinsDao.java27
-rw-r--r--src/main/java/io/trygvis/esper/testing/util/sql/PageRequest.java1
-rw-r--r--src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java14
-rw-r--r--src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java45
-rw-r--r--src/main/webapp/WEB-INF/urlrewrite.xml7
-rw-r--r--src/main/webapp/apps/buildApp/build.html30
-rw-r--r--src/main/webapp/apps/buildApp/buildApp.js15
-rw-r--r--src/main/webapp/apps/core/CoreResources.js14
-rw-r--r--src/main/webapp/apps/core/PagingTableService.js64
-rw-r--r--src/main/webapp/apps/jenkinsApp/JenkinsResources.js17
-rw-r--r--src/main/webapp/apps/jenkinsApp/JenkinsServerService.js9
-rw-r--r--src/main/webapp/apps/jenkinsApp/jenkinsApp.js19
-rw-r--r--src/main/webapp/apps/jenkinsApp/server.html81
-rw-r--r--src/main/webapp/apps/personApp/person.html4
-rw-r--r--src/main/webapp/build/build.jspx21
-rw-r--r--src/main/webapp/jenkins/index.jspx7
-rw-r--r--src/main/webapp/person/person.jspx1
19 files changed, 332 insertions, 56 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakablePoller.java b/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakablePoller.java
index 05d4976..3183304 100644
--- a/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakablePoller.java
+++ b/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakablePoller.java
@@ -40,7 +40,7 @@ public class UnbreakablePoller implements TablePoller.NewRowCallback<BuildDto> {
public void process(Connection c, BuildDto build) throws SQLException {
Daos daos = new Daos(c);
- List<UUID> persons = daos.buildDao.selectPersonsFromBuildParticipant(build.uuid);
+ List<UUID> persons = daos.buildDao.selectBuildParticipantByBuild(build.uuid);
logger.info("Processing build={}, success={}, #persons={}", build.uuid, build.success, persons.size());
for (UUID person : persons) {
diff --git a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
index e498017..416faf6 100644
--- a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
+++ b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
@@ -57,7 +57,7 @@ public class BuildDao {
}
}
- public List<UUID> selectPersonsFromBuildParticipant(UUID build) throws SQLException {
+ public List<UUID> selectBuildParticipantByBuild(UUID build) throws SQLException {
try (PreparedStatement s = c.prepareStatement("SELECT person FROM build_participant WHERE build=?")) {
int i = 1;
s.setString(i, build.toString());
@@ -65,6 +65,14 @@ public class BuildDao {
}
}
+ public List<PersonDto> selectPersonsFromBuildParticipant(UUID build) throws SQLException {
+ try (PreparedStatement s = c.prepareStatement("SELECT " + PersonDao.PERSON + " FROM person p, build_participant bp WHERE bp.person = p.uuid AND build=?")) {
+ int i = 1;
+ s.setString(i, build.toString());
+ return toList(s, PersonDao.person);
+ }
+ }
+
public SqlOption<BuildDto> selectBuild(UUID uuid) throws SQLException {
try (PreparedStatement s = c.prepareStatement("SELECT " + BUILD + " FROM build WHERE uuid=?")) {
int i = 1;
diff --git a/src/main/java/io/trygvis/esper/testing/jenkins/JenkinsDao.java b/src/main/java/io/trygvis/esper/testing/jenkins/JenkinsDao.java
index 8d32dbe..117d91d 100644
--- a/src/main/java/io/trygvis/esper/testing/jenkins/JenkinsDao.java
+++ b/src/main/java/io/trygvis/esper/testing/jenkins/JenkinsDao.java
@@ -10,6 +10,7 @@ import java.util.*;
import java.util.List;
import static fj.data.Option.*;
+import static io.trygvis.esper.testing.Util.toList;
import static io.trygvis.esper.testing.Util.toUuidArray;
import static io.trygvis.esper.testing.util.sql.SqlOption.fromRs;
import static java.lang.System.*;
@@ -96,6 +97,10 @@ public class JenkinsDao {
}
};
+ // -----------------------------------------------------------------------
+ // Server
+ // -----------------------------------------------------------------------
+
public List<JenkinsServerDto> selectServers(boolean enabledOnly) throws SQLException {
String sql = "SELECT " + JENKINS_SERVER + " FROM jenkins_server";
@@ -121,6 +126,10 @@ public class JenkinsDao {
}
}
+ // -----------------------------------------------------------------------
+ // Job
+ // -----------------------------------------------------------------------
+
public SqlOption<JenkinsJobDto> selectJob(UUID uuid) throws SQLException {
try (PreparedStatement s = c.prepareStatement("SELECT " + JENKINS_JOB + " FROM jenkins_job WHERE uuid=?")) {
s.setString(1, uuid.toString());
@@ -128,6 +137,16 @@ public class JenkinsDao {
}
}
+ public List<JenkinsJobDto> selectJobsByServer(UUID server, PageRequest page) throws SQLException {
+ try (PreparedStatement s = c.prepareStatement("SELECT " + JENKINS_JOB + " FROM jenkins_job WHERE server=? ORDER BY created_date LIMIT ? OFFSET ?")) {
+ int i = 1;
+ s.setString(i++, server.toString());
+ s.setInt(i++, page.count.orSome(10));
+ s.setInt(i, page.startIndex.orSome(0));
+ return toList(s, jenkinsJob);
+ }
+ }
+
public SqlOption<JenkinsJobDto> selectJobByUrl(URI url) throws SQLException {
try (PreparedStatement s = c.prepareStatement("SELECT " + JENKINS_JOB + " FROM jenkins_job WHERE url=?")) {
s.setString(1, url.toASCIIString());
@@ -161,6 +180,10 @@ public class JenkinsDao {
}
}
+ // -----------------------------------------------------------------------
+ // Build
+ // -----------------------------------------------------------------------
+
public SqlOption<JenkinsBuildDto> selectBuildByEntryId(String id) throws SQLException {
try (PreparedStatement s = c.prepareStatement("SELECT " + JENKINS_BUILD + " FROM jenkins_build WHERE entry_id=?")) {
int i = 1;
@@ -190,6 +213,10 @@ public class JenkinsDao {
}
}
+ // -----------------------------------------------------------------------
+ // User
+ // -----------------------------------------------------------------------
+
public UUID insertUser(UUID server, String absoluteUrl) throws SQLException {
try (PreparedStatement s = c.prepareStatement("INSERT INTO jenkins_user(" + JENKINS_USER + ") VALUES(?, ?, ?, ?)")) {
UUID uuid = UUID.randomUUID();
diff --git a/src/main/java/io/trygvis/esper/testing/util/sql/PageRequest.java b/src/main/java/io/trygvis/esper/testing/util/sql/PageRequest.java
index 824291c..38d417d 100644
--- a/src/main/java/io/trygvis/esper/testing/util/sql/PageRequest.java
+++ b/src/main/java/io/trygvis/esper/testing/util/sql/PageRequest.java
@@ -9,6 +9,7 @@ import javax.servlet.http.*;
public class PageRequest {
public final Option<Integer> startIndex;
public final Option<Integer> count;
+ public static final PageRequest FIRST_PAGE = new PageRequest(Option.<Integer>none(), Option.<Integer>none());
public PageRequest(Option<Integer> startIndex, Option<Integer> count) {
this.startIndex = startIndex;
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 2f4b77b..9b22674 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
@@ -115,6 +115,20 @@ public class CoreResource extends AbstractResource {
}
@GET
+ @Path("/build-participant/{uuid}")
+ public List<PersonJson> getBuildParticipants(@MagicParam final UUID build) throws Exception {
+ return da.inTransaction(new DatabaseAccess.DaosCallback<List<PersonJson>>() {
+ public List<PersonJson> run(Daos daos) throws SQLException {
+ List<PersonJson> list = new ArrayList<>();
+ for (PersonDto person : daos.buildDao.selectPersonsFromBuildParticipant(build)) {
+ list.add(getPersonJson(daos, person));
+ }
+ return list;
+ }
+ });
+ }
+
+ @GET
@Path("/build/{uuid}")
public BuildJson getBuild(@MagicParam final UUID uuid) throws Exception {
return get(new DatabaseAccess.DaosCallback<Option<BuildJson>>() {
diff --git a/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java b/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java
index 284d90e..33b3f88 100644
--- a/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java
+++ b/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java
@@ -3,6 +3,8 @@ package io.trygvis.esper.testing.web.resource;
import fj.data.*;
import io.trygvis.esper.testing.*;
import io.trygvis.esper.testing.jenkins.*;
+import io.trygvis.esper.testing.util.sql.*;
+import io.trygvis.esper.testing.web.*;
import org.joda.time.*;
import javax.ws.rs.*;
@@ -55,9 +57,34 @@ public class JenkinsResource extends AbstractResource {
});
}
+ @GET
+ @Path("/job")
+ @Produces(MediaType.APPLICATION_JSON)
+ public List<JenkinsJobJson> getJobs(@MagicParam(query = "server") final UUID server, @MagicParam final PageRequest page) throws Exception {
+ return da.inTransaction(new DatabaseAccess.DaosCallback<List<JenkinsJobJson>>() {
+ public List<JenkinsJobJson> run(final Daos daos) throws SQLException {
+ List<JenkinsJobJson> jobs = new ArrayList<>();
+ for (JenkinsJobDto job : daos.jenkinsDao.selectJobsByServer(server, page)) {
+ jobs.add(getJenkinsJobJson(job));
+ }
+ return jobs;
+ }
+ });
+ }
+
private JenkinsServerJson getJenkinsServerJson(Daos daos, JenkinsServerDto server) throws SQLException {
int count = daos.jenkinsDao.selectJobCountForServer(server.uuid);
- return new JenkinsServerJson(server.uuid, server.createdDate, server.url, server.enabled, count);
+
+ List<JenkinsJobJson> jobs = new ArrayList<>();
+ for (JenkinsJobDto jobDto : daos.jenkinsDao.selectJobsByServer(server.uuid, PageRequest.FIRST_PAGE)) {
+ jobs.add(getJenkinsJobJson(jobDto));
+ }
+
+ return new JenkinsServerJson(server.uuid, server.createdDate, server.url, server.enabled, count, jobs);
+ }
+
+ private JenkinsJobJson getJenkinsJobJson(JenkinsJobDto job) {
+ return new JenkinsJobJson(job.uuid, job.createdDate, job.displayName.toNull());
}
public static UUID parseUuid(String s) {
@@ -75,12 +102,26 @@ class JenkinsServerJson {
public final URI url;
public final boolean enabled;
public final int jobCount;
+ public final List<JenkinsJobJson> recentJobs;
- JenkinsServerJson(UUID uuid, DateTime createdDate, URI url, boolean enabled, int jobCount) {
+ JenkinsServerJson(UUID uuid, DateTime createdDate, URI url, boolean enabled, int jobCount, List<JenkinsJobJson> recentJobs) {
this.uuid = uuid;
this.createdDate = createdDate;
this.url = url;
this.enabled = enabled;
this.jobCount = jobCount;
+ this.recentJobs = recentJobs;
+ }
+}
+
+class JenkinsJobJson {
+ public final UUID uuid;
+ public final DateTime createdDate;
+ public final String displayName;
+
+ JenkinsJobJson(UUID uuid, DateTime createdDate, String displayName) {
+ this.uuid = uuid;
+ this.createdDate = createdDate;
+ this.displayName = displayName;
}
}
diff --git a/src/main/webapp/WEB-INF/urlrewrite.xml b/src/main/webapp/WEB-INF/urlrewrite.xml
index e5f3338..4d909ca 100644
--- a/src/main/webapp/WEB-INF/urlrewrite.xml
+++ b/src/main/webapp/WEB-INF/urlrewrite.xml
@@ -21,4 +21,11 @@
<to type="forward">/person/person.jspx</to>
</rule>
+
+ <rule match-type="regex">
+ <from>^/build/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$</from>
+ <set type="parameter" name="uuid">$1</set>
+ <to type="forward">/build/build.jspx</to>
+ </rule>
+
</urlrewrite>
diff --git a/src/main/webapp/apps/buildApp/build.html b/src/main/webapp/apps/buildApp/build.html
new file mode 100644
index 0000000..b2d4bd9
--- /dev/null
+++ b/src/main/webapp/apps/buildApp/build.html
@@ -0,0 +1,30 @@
+<div class="container">
+
+ <div class="page-header">
+ <h1>Build</h1>
+ </div>
+
+ <div>
+ <h3>Participants</h3>
+ <table>
+ <tr>
+ <th>Date</th>
+ <td>{{build.date | date:'medium'}}</td>
+ </tr>
+ <tr>
+ <th>Status</th>
+ <td>
+ <span ng-show="build.success">SUCCESS</span>
+ <span ng-hide="build.success">FAILURE</span>
+ </td>
+ </tr>
+ </table>
+ <h3>Participants</h3>
+
+ <p ng-repeat="participant in participants">
+ <span>{{participant.name}}</span>
+ </p>
+
+ </div>
+
+</div>
diff --git a/src/main/webapp/apps/buildApp/buildApp.js b/src/main/webapp/apps/buildApp/buildApp.js
new file mode 100644
index 0000000..187b240
--- /dev/null
+++ b/src/main/webapp/apps/buildApp/buildApp.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var buildApp = angular.module('buildApp', ['build', 'buildParticipant']).config(function ($routeProvider) {
+ $routeProvider.
+ when('/', {controller: BuildCtrl, templateUrl: '/apps/buildApp/build.html?noCache=' + noCache});
+});
+
+function BuildCtrl($scope, Build, BuildParticipant) {
+ Build.get({uuid: uuid}, function(build) {
+ window.build = $scope.build = build;
+ });
+ BuildParticipant.query({uuid: uuid}, function(persons) {
+ $scope.participants = persons;
+ });
+}
diff --git a/src/main/webapp/apps/core/CoreResources.js b/src/main/webapp/apps/core/CoreResources.js
index 96d4b24..74ac184 100644
--- a/src/main/webapp/apps/core/CoreResources.js
+++ b/src/main/webapp/apps/core/CoreResources.js
@@ -4,14 +4,16 @@ function Person($resource) {
return $resource('/resource/core/person/:uuid', {uuid: '@uuid'});
}
-angular.
- module('person', ['ngResource']).
- factory('Person', Person);
+angular.module('person', ['ngResource']).factory('Person', Person);
function Build($resource) {
return $resource('/resource/core/build/:uuid', {uuid: '@uuid'});
}
-angular.
- module('build', ['ngResource']).
- factory('Build', Build);
+angular.module('build', ['ngResource']).factory('Build', Build);
+
+function BuildParticipant($resource) {
+ return $resource('/resource/core/build-participant/:uuid', {uuid: '@uuid'});
+}
+
+angular.module('buildParticipant', ['ngResource']).factory('BuildParticipant', BuildParticipant);
diff --git a/src/main/webapp/apps/core/PagingTableService.js b/src/main/webapp/apps/core/PagingTableService.js
new file mode 100644
index 0000000..689a225
--- /dev/null
+++ b/src/main/webapp/apps/core/PagingTableService.js
@@ -0,0 +1,64 @@
+function PagingTableService() {
+ var create = function ($scope, fetchCallback) {
+ var self = {
+ rows: [],
+ startIndex: 0,
+ count: 10
+ };
+
+ var update = function(){
+ fetchCallback(self.startIndex, self.count, function(data) {
+ self.rows = data.rows;
+ });
+ };
+
+ self.first = function () {
+ self.startIndex = 0;
+ update();
+ };
+
+ self.next = function () {
+ this.startIndex += this.count;
+ update();
+ };
+
+ self.prev = function () {
+ if (self.startIndex == 0) {
+ return;
+ }
+ self.startIndex -= self.count;
+ update();
+ };
+
+ // Do an initial fetch
+ update();
+
+ return self;
+ };
+
+ var defaultCallback = function(Resource, args) {
+ return function(startIndex, count, cb) {
+ console.log("fetching", arguments);
+ args.startIndex = startIndex;
+ args.count = count;
+ Resource.query(args, function(data, headers) {
+ var totalResults = headers("total-results");
+ console.log("got data", arguments);
+ console.log("totalResults", totalResults);
+ cb({
+ totalResults: totalResults,
+ rows: data
+ });
+ });
+ };
+ };
+
+ return {
+ create: create,
+ defaultCallback: defaultCallback
+ }
+}
+
+angular.
+ module('pagingTableService', ['ngResource']).
+ factory('PagingTableService', PagingTableService);
diff --git a/src/main/webapp/apps/jenkinsApp/JenkinsResources.js b/src/main/webapp/apps/jenkinsApp/JenkinsResources.js
new file mode 100644
index 0000000..0026932
--- /dev/null
+++ b/src/main/webapp/apps/jenkinsApp/JenkinsResources.js
@@ -0,0 +1,17 @@
+'use strict';
+
+function JenkinsServer($resource) {
+ return $resource('/resource/jenkins/server/:uuid', {uuid: '@uuid'});
+}
+
+angular.
+ module('jenkinsServer', ['ngResource']).
+ factory('JenkinsServer', JenkinsServer);
+
+function JenkinsJob($resource) {
+ return $resource('/resource/jenkins/job/:uuid', {uuid: '@uuid'});
+}
+
+angular.
+ module('jenkinsJob', ['ngResource']).
+ factory('JenkinsJob', JenkinsJob);
diff --git a/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js b/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js
deleted file mode 100644
index b26c9b1..0000000
--- a/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-function JenkinsServerService($resource) {
- return $resource('/resource/jenkins/server/:uuid', {uuid: '@uuid'});
-}
-
-angular.
- module('jenkinsServerService', ['ngResource']).
- factory('JenkinsServerService', JenkinsServerService);
diff --git a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
index 5477039..e51c9f3 100644
--- a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
+++ b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
@@ -1,6 +1,6 @@
'use strict';
-var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServerService']).config(function ($routeProvider, $locationProvider) {
+var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServer', 'jenkinsJob', 'pagingTableService']).config(function ($routeProvider) {
$routeProvider.
when('/', {controller: ServerListCtrl, templateUrl: '/apps/jenkinsApp/server-list.html?noCache=' + noCache});
$routeProvider.
@@ -11,12 +11,12 @@ var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServerService']).config(f
// $locationProvider.html5Mode(true);
});
-function ServerListCtrl($scope, $location, JenkinsServerService) {
- JenkinsServerService.query(function (servers) {
+function ServerListCtrl($scope, $location, JenkinsServer) {
+ JenkinsServer.query(function (servers) {
$scope.servers = servers;
});
- $scope.showServers = function (uuid) {
+ $scope.showServers = function () {
$location.path('/');
};
@@ -25,13 +25,16 @@ function ServerListCtrl($scope, $location, JenkinsServerService) {
};
}
-function ServerCtrl($scope, $location, $routeParams, JenkinsServerService) {
- window.x = $routeParams;
- JenkinsServerService.get({uuid: $routeParams.uuid}, function (server) {
+function ServerCtrl($scope, $location, $routeParams, JenkinsServer, JenkinsJob, PagingTableService) {
+ var serverUuid = $routeParams.uuid;
+
+ JenkinsServer.get({uuid: serverUuid}, function (server) {
$scope.server = server;
});
- $scope.showServers = function (uuid) {
+ $scope.jobs = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsJob, {server: serverUuid}));
+
+ $scope.showServers = function () {
$location.path('/');
};
diff --git a/src/main/webapp/apps/jenkinsApp/server.html b/src/main/webapp/apps/jenkinsApp/server.html
index 9b27dfe..8a784e8 100644
--- a/src/main/webapp/apps/jenkinsApp/server.html
+++ b/src/main/webapp/apps/jenkinsApp/server.html
@@ -1,25 +1,60 @@
-<div class="page-header">
- <h1>Jenkins Server</h1>
-</div>
+<div class="container">
+
+ <div class="page-header">
+ <h1>Jenkins Server</h1>
+ </div>
+
+ <ul class="breadcrumb">
+ <li><a ng-click="showServers()">All Servers</a> <span class="divider">/</span></li>
+ <li class="active">Server</li>
+ </ul>
-<ul class="breadcrumb">
- <li><a ng-click="showServers()">All Servers</a> <span class="divider">/</span></li>
- <li class="active">Server</li>
-</ul>
+ <h3>Overview</h3>
+ <table class="table">
+ <tbody>
+ <tr>
+ <th>URL</th>
+ <td><a href="{{server.url}}">{{server.url}}</a></td>
+ </tr>
+ <tr>
+ <th>Enabled</th>
+ <td>{{server.enabled}}</td>
+ </tr>
+ <tr>
+ <th>Stats</th>
+ <td>{{server.jobCount}} jobs, {{server.buildCount}} builds</td>
+ </tr>
+ </tbody>
+ </table>
-<table class="table">
- <tbody>
- <tr>
- <th>URL</th>
- <td><a href="{{server.url}}">{{server.url}}</a></td>
- </tr>
- <tr>
- <th>Enabled</th>
- <td>{{server.enabled}}</td>
- </tr>
- <tr>
- <th>Stats</th>
- <td>{{server.jobCount}} jobs, {{server.buildCount}} builds</td>
- </tr>
- </tbody>
-</table>
+ <h3>Recent Jobs</h3>
+ <table class="table">
+ <thead>
+ <tr>
+ <th>Job</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="job in jobs.rows">
+ <td>{{job.createdDate | date:'medium'}}</td>
+ <td>{{job.displayName}}</td>
+ <td>{{job.uuid}}</td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td colspan="3">
+ <ul class="pager">
+ <li class="previous" ng-class="{disabled: jobs.startIndex == 0}">
+ <a ng-click="jobs.prev()">&larr; Older</a>
+ </li>
+ <li class="next">
+ <a ng-click="jobs.next()">Newer &rarr;</a>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+
+</div>
diff --git a/src/main/webapp/apps/personApp/person.html b/src/main/webapp/apps/personApp/person.html
index d9524ae..83aea0a 100644
--- a/src/main/webapp/apps/personApp/person.html
+++ b/src/main/webapp/apps/personApp/person.html
@@ -28,12 +28,14 @@
<tr>
<th>Date</th>
<th>Success</th>
+ <th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="build in recentBuilds" class="{{{true: 'success', false: 'error'}[build.success]}}">
<td>{{build.date | date:'medium'}}</td>
<td>{{build.success}}</td>
+ <td><a href="/build/{{build.uuid}}">Details</a></td>
</tr>
</tbody>
</table>
@@ -41,7 +43,7 @@
<div id="builds" ng-show="mode == 'builds'">
<h3>Builds</h3>
- <table class="table .table-bordered">
+ <table class="table">
<thead>
<tr>
<th>Date</th>
diff --git a/src/main/webapp/build/build.jspx b/src/main/webapp/build/build.jspx
new file mode 100644
index 0000000..b47e864
--- /dev/null
+++ b/src/main/webapp/build/build.jspx
@@ -0,0 +1,21 @@
+<html xmlns:jsp="http://java.sun.com/JSP/Page" jsp:version="2.0"
+ xmlns:common="urn:jsptagdir:/WEB-INF/tags/common"
+ ng-app="buildApp">
+<jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat"/>
+<jsp:directive.page contentType="text/html;charset=UTF-8"/>
+
+<common:head>
+ <script>var uuid = '${param.uuid}';</script>
+ <common:headjs label="CoreResources" resource="/apps/core/CoreResources.js"/>
+ <common:headjs label="buildApp" resource="/apps/buildApp/buildApp.js"/>
+</common:head>
+
+<body>
+
+<div id="content" ng-view=""><!-- --></div>
+
+<common:footer/>
+
+</body>
+
+</html>
diff --git a/src/main/webapp/jenkins/index.jspx b/src/main/webapp/jenkins/index.jspx
index 7292e36..0e8dc22 100644
--- a/src/main/webapp/jenkins/index.jspx
+++ b/src/main/webapp/jenkins/index.jspx
@@ -5,15 +5,14 @@
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<common:head>
- <common:headjs label="JenkinsServerService" resource="/apps/jenkinsApp/JenkinsServerService.js"/>
+ <common:headjs label="JenkinsResources" resource="/apps/jenkinsApp/JenkinsResources.js"/>
+ <common:headjs label="PagingTableService" resource="/apps/core/PagingTableService.js"/>
<common:headjs label="jenkinsApp" resource="/apps/jenkinsApp/jenkinsApp.js"/>
</common:head>
<body>
-<div id="content">
- <div class="container" ng-view=""><!-- --></div>
-</div>
+<div id="content" ng-view=""><!-- --></div>
<common:footer/>
diff --git a/src/main/webapp/person/person.jspx b/src/main/webapp/person/person.jspx
index 97d9d41..b3b2cbd 100644
--- a/src/main/webapp/person/person.jspx
+++ b/src/main/webapp/person/person.jspx
@@ -1,6 +1,5 @@
<html xmlns:jsp="http://java.sun.com/JSP/Page" jsp:version="2.0"
xmlns:common="urn:jsptagdir:/WEB-INF/tags/common"
- xmlns:c="http://java.sun.com/jstl/core"
ng-app="personApp">
<jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat"/>
<jsp:directive.page contentType="text/html;charset=UTF-8"/>