diff options
Diffstat (limited to 'src/main/webapp')
-rw-r--r-- | src/main/webapp/apps/jenkinsApp/build.html | 41 | ||||
-rw-r--r-- | src/main/webapp/apps/jenkinsApp/jenkinsApp.js | 22 | ||||
-rwxr-xr-x | src/main/webapp/apps/jenkinsApp/job.html | 4 |
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> |