diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-19 09:40:14 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-19 09:40:14 +0100 |
commit | eb6cbd28992cec9025a8e95f8f03ae3839699e0b (patch) | |
tree | d3c1f1416da2ae36894d3087a75f3c1d7f280fad /src/main/resources/webapp/apps | |
parent | 17be3886fbee46c34f1ea78cd32d5726e538e641 (diff) | |
download | esper-testing-eb6cbd28992cec9025a8e95f8f03ae3839699e0b.tar.gz esper-testing-eb6cbd28992cec9025a8e95f8f03ae3839699e0b.tar.bz2 esper-testing-eb6cbd28992cec9025a8e95f8f03ae3839699e0b.tar.xz esper-testing-eb6cbd28992cec9025a8e95f8f03ae3839699e0b.zip |
o Reverting the timestamp => createdDate change, it was wrong. Adding ability to sort on timestamp.
Created date is when we discovered the build, the timestamp is when Jenkins did the build.
Diffstat (limited to 'src/main/resources/webapp/apps')
8 files changed, 22 insertions, 17 deletions
diff --git a/src/main/resources/webapp/apps/buildApp/build.html b/src/main/resources/webapp/apps/buildApp/build.html index 2a24b16..fec38d2 100755 --- a/src/main/resources/webapp/apps/buildApp/build.html +++ b/src/main/resources/webapp/apps/buildApp/build.html @@ -9,7 +9,7 @@ <table> <tr> <th>Date</th> - <td>{{build.build.createdDate | date:'medium'}}</td> + <td>{{build.build.timestamp | date:'medium'}}</td> </tr> <tr> <th>Status</th> diff --git a/src/main/resources/webapp/apps/frontPageApp/badge.html b/src/main/resources/webapp/apps/frontPageApp/badge.html index 48d15ce..b501f15 100755 --- a/src/main/resources/webapp/apps/frontPageApp/badge.html +++ b/src/main/resources/webapp/apps/frontPageApp/badge.html @@ -15,11 +15,16 @@ <p> The badge was awarded for having {{badge.personalBadge.builds.length}} successful builds in a row: </p> - <ul class="unstyled"> - <li ng-repeat="b in badge.personalBadge.builds"> - <a class="btn" href="#/build/{{b}}">{{$index + 1}} <i class="icon-chevron-right"></i></a> - </li> - </ul> + <table class="table table-striped"> + <tr ng-repeat="b in badge.personalBadge.builds"> + <td> + {{b.timestamp | date:'medium'}} + </td> + <td> + <a class="btn" href="#/build/{{b}}">{{$index + 1}} <i class="icon-chevron-right"></i></a> + </td> + </tr> + </table> </div> </div> diff --git a/src/main/resources/webapp/apps/frontPageApp/build.html b/src/main/resources/webapp/apps/frontPageApp/build.html index cbf8f8e..0972758 100755 --- a/src/main/resources/webapp/apps/frontPageApp/build.html +++ b/src/main/resources/webapp/apps/frontPageApp/build.html @@ -16,7 +16,7 @@ </tr> <tr> <th>Duration</th> - <td>{{build.build.createdDate | date:'medium'}}</td> + <td>{{build.build.timestamp | date:'medium'}}</td> </tr> </tbody> </table> diff --git a/src/main/resources/webapp/apps/frontPageApp/buildList.html b/src/main/resources/webapp/apps/frontPageApp/buildList.html index ddbffe2..d069736 100755 --- a/src/main/resources/webapp/apps/frontPageApp/buildList.html +++ b/src/main/resources/webapp/apps/frontPageApp/buildList.html @@ -28,7 +28,7 @@ <tr ng-repeat="build in group" class="{{{true: 'success', false: 'error'}[build.build.success]}}"> <td> <h4> - {{build.build.createdDate | date:'shortTime'}}: + {{build.build.timestamp | date:'shortTime'}}: {{{true: 'SUCCESS', false: 'FAILURE'}[build.build.success]}} </h4> diff --git a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js index c376f83..5623c18 100755 --- a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js +++ b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js @@ -88,11 +88,11 @@ function PersonCtrl($scope, $routeParams, Person, Build, JenkinsUser, PagingTabl $scope.mode = 'overview'; var watcher = function () { - $scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.createdDate}); + $scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.timestamp}); console.log("$scope.buildGroups", $scope.buildGroups); }; $scope.buildGroups = []; - $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {person: personUuid}), + $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {person: personUuid, orderBy: "timestamp-"}), {count: 50, watcher: watcher}); $scope.setMode = function(mode) { @@ -118,14 +118,14 @@ function PersonCtrl($scope, $routeParams, Person, Build, JenkinsUser, PagingTabl })}); }); - Build.query({person: personUuid}, function (builds) { + Build.query({person: personUuid, orderBy: "timestamp-"}, function (builds) { $scope.recentBuilds = builds; }); } function BuildListCtrl($scope, Build, PagingTableService) { var watcher = function () { - $scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.build.createdDate}); + $scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.build.timestamp}); }; $scope.buildGroups = []; diff --git a/src/main/resources/webapp/apps/frontPageApp/person.html b/src/main/resources/webapp/apps/frontPageApp/person.html index f88a7d0..11cfd0b 100755 --- a/src/main/resources/webapp/apps/frontPageApp/person.html +++ b/src/main/resources/webapp/apps/frontPageApp/person.html @@ -48,7 +48,7 @@ <h3>Recent builds</h3> <table class="table"> <tr ng-repeat="build in recentBuilds" class="{{{true: 'success', false: 'error'}[build.success]}}"> - <td>{{build.createdDate | date:'medium'}}</td> + <td>{{build.timestamp | date:'medium'}}</td> <td>{{{true: 'Success', false: 'Failure'}[build.success]}}</td> <td><a href="#/build/{{build.uuid}}">Details</a></td> </tr> @@ -70,7 +70,7 @@ <table class="table"> <tr ng-repeat="build in group" class="{{{true: 'success', false: 'error'}[build.success]}}"> <td> - {{build.createdDate | date:'shortTime'}}: + {{build.timestamp | date:'shortTime'}}: {{{true: 'SUCCESS', false: 'FAILURE'}[build.success]}} <a class="btn pull-right" href="#/build/{{build.uuid}}"><i class="icon-chevron-right"></i></a> @@ -100,7 +100,7 @@ </thead> <tbody> <tr ng-repeat="build in builds.rows" class="{{{true: 'success', false: 'error'}[build.success]}}"> - <td>{{build.createdDate | date:'medium'}}</td> + <td>{{build.timestamp | date:'medium'}}</td> <td> <a class="btn btn-small" href="#/build/{{build.uuid}}"><i class="icon-chevron-right"></i></a> </td> diff --git a/src/main/resources/webapp/apps/jenkinsApp/build.html b/src/main/resources/webapp/apps/jenkinsApp/build.html index db07f44..7239c90 100755 --- a/src/main/resources/webapp/apps/jenkinsApp/build.html +++ b/src/main/resources/webapp/apps/jenkinsApp/build.html @@ -18,7 +18,7 @@ <tbody> <tr> <th>Timestamp</th> - <td>{{details.build.createdDate | date:'medium'}}</td> + <td>{{details.build.timestamp | date:'medium'}}</td> </tr> <tr> <th>Number</th> diff --git a/src/main/resources/webapp/apps/jenkinsApp/job.html b/src/main/resources/webapp/apps/jenkinsApp/job.html index e0c1a10..8942ab7 100755 --- a/src/main/resources/webapp/apps/jenkinsApp/job.html +++ b/src/main/resources/webapp/apps/jenkinsApp/job.html @@ -38,7 +38,7 @@ </thead> <tbody> <tr ng-repeat="build in builds.rows" class="{{{true: 'success', false: 'error'}[build.success]}}"> - <td>{{build.createdDate | date:'medium'}}</td> + <td>{{build.timestamp | date:'medium'}}</td> <td>{{build.result}}</td> <td><a class="btn" ng-click="showBuild(build.uuid)"><i class="icon-chevron-right"></i></a></td> </tr> |