aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-29 18:59:32 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-04 22:09:16 +0100
commit5ec81d9e77fcb56ddf5953989e23b6cafe4772a3 (patch)
tree63b2d1c262a06bcfb54a6dcb368af032aacc84a2 /src/main/webapp
parent8cce8890eca34fead35ad19a0db6d95dd047b3a6 (diff)
downloadesper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.tar.gz
esper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.tar.bz2
esper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.tar.xz
esper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.zip
o Adding build view for jenkins app.
Diffstat (limited to 'src/main/webapp')
-rw-r--r--src/main/webapp/apps/jenkinsApp/build.html41
-rw-r--r--src/main/webapp/apps/jenkinsApp/jenkinsApp.js22
-rwxr-xr-xsrc/main/webapp/apps/jenkinsApp/job.html4
3 files changed, 61 insertions, 6 deletions
diff --git a/src/main/webapp/apps/jenkinsApp/build.html b/src/main/webapp/apps/jenkinsApp/build.html
new file mode 100644
index 0000000..02fa60b
--- /dev/null
+++ b/src/main/webapp/apps/jenkinsApp/build.html
@@ -0,0 +1,41 @@
+<div class="container">
+
+ <div class="page-header">
+ <h1>Jenkins Build</h1>
+ </div>
+
+ <ul class="breadcrumb">
+ <li><a ng-click="showServers()">All Servers</a> <span class="divider">/</span></li>
+ <li><a ng-click="showServer()">Servers</a> <span class="divider">/</span></li>
+ <li><a ng-click="showJob()">Job</a> <span class="divider">/</span></li>
+ <li class="active">Build</li>
+ </ul>
+
+ <h3>Overview</h3>
+ <table class="table">
+ <tbody>
+ <tr>
+ <th>Timestamp</th>
+ <td>{{details.build.timestamp | date:'medium'}}</td>
+ </tr>
+ <tr>
+ <th>Number</th>
+ <td>{{details.build.number}}</td>
+ </tr>
+ <tr>
+ <th>Duration</th>
+ <td>{{details.build.duration / 1000 | number:0}}s</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h3>Users</h3>
+ <table>
+ <tbody>
+ <tr ng-repeat="user in details.participants">
+ <td>{{user.uuid}}</td>
+ </tr>
+ </tbody>
+ </table>
+
+</div>
diff --git a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
index 19d107d..1cd2d2a 100644
--- a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
+++ b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
@@ -4,7 +4,8 @@ var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServer', 'jenkinsJob', 'j
$routeProvider.
when('/', {controller: ServerListCtrl, templateUrl: '/apps/jenkinsApp/server-list.html?noCache=' + noCache}).
when('/server/:uuid', {controller: ServerCtrl, templateUrl: '/apps/jenkinsApp/server.html?noCache=' + noCache}).
- when('/job/:uuid', {controller: JobCtrl, templateUrl: '/apps/jenkinsApp/job.html?noCache=' + noCache});
+ when('/job/:uuid', {controller: JobCtrl, templateUrl: '/apps/jenkinsApp/job.html?noCache=' + noCache}).
+ when('/build/:uuid', {controller: BuildCtrl, templateUrl: '/apps/jenkinsApp/build.html?noCache=' + noCache});
});
function ServerListCtrl($scope, $location, JenkinsServer) {
@@ -32,12 +33,25 @@ function ServerCtrl($scope, $location, $routeParams, JenkinsServer, JenkinsJob,
function JobCtrl($scope, $location, $routeParams, JenkinsJob, JenkinsBuild, PagingTableService) {
var jobUuid = $routeParams.uuid;
- JenkinsJob.get({uuid: jobUuid}, function (job) {
- $scope.job = job;
+ JenkinsJob.get({uuid: jobUuid}, function (details) {
+ $scope.details = details;
});
$scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsBuild, {job: jobUuid}));
$scope.showServers = function () { $location.path('/'); };
- $scope.showServer = function (uuid) { $location.path('/server/' + $scope.job.server); };
+ $scope.showServer = function () { $location.path('/server/' + $scope.job.server); };
+ $scope.showBuild = function (uuid) { $location.path('/build/' + uuid); };
+}
+
+function BuildCtrl($scope, $location, $routeParams, JenkinsBuild) {
+ var buildUuid = $routeParams.uuid;
+
+ JenkinsBuild.get({uuid: buildUuid}, function (details) {
+ $scope.details = details;
+ });
+
+ $scope.showServers = function () { $location.path('/'); };
+ $scope.showServer = function (uuid) { $location.path('/server/' + $scope.server.uuid); };
+ $scope.showJob = function (uuid) { $location.path('/job/' + $scope.build.job); };
}
diff --git a/src/main/webapp/apps/jenkinsApp/job.html b/src/main/webapp/apps/jenkinsApp/job.html
index 6ee7af0..027748a 100755
--- a/src/main/webapp/apps/jenkinsApp/job.html
+++ b/src/main/webapp/apps/jenkinsApp/job.html
@@ -16,11 +16,11 @@
<tbody>
<tr>
<th>URL</th>
- <td><a href="{{job.displayName}}">{{job.displayName}}</a></td>
+ <td><a href="{{details.job.displayName}}">{{details.job.displayName}}</a></td>
</tr>
<tr>
<th>Build count</th>
- <td>{{job.buildCount}}</td>
+ <td>{{details.buildCount}}</td>
</tr>
</tbody>
</table>