From eb6cbd28992cec9025a8e95f8f03ae3839699e0b Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 19 Jan 2013 09:40:14 +0100 Subject: 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. --- src/main/resources/webapp/apps/buildApp/build.html | 2 +- src/main/resources/webapp/apps/frontPageApp/badge.html | 15 ++++++++++----- src/main/resources/webapp/apps/frontPageApp/build.html | 2 +- .../resources/webapp/apps/frontPageApp/buildList.html | 2 +- .../resources/webapp/apps/frontPageApp/frontPageApp.js | 8 ++++---- src/main/resources/webapp/apps/frontPageApp/person.html | 6 +++--- src/main/resources/webapp/apps/jenkinsApp/build.html | 2 +- src/main/resources/webapp/apps/jenkinsApp/job.html | 2 +- 8 files changed, 22 insertions(+), 17 deletions(-) (limited to 'src/main/resources/webapp') 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 @@ - + 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 @@

The badge was awarded for having {{badge.personalBadge.builds.length}} successful builds in a row:

- +
Date{{build.build.createdDate | date:'medium'}}{{build.build.timestamp | date:'medium'}}
Status
+ + + + +
+ {{b.timestamp | date:'medium'}} + + {{$index + 1}} +
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 @@ Duration - {{build.build.createdDate | date:'medium'}} + {{build.build.timestamp | date:'medium'}} 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 @@

- {{build.build.createdDate | date:'shortTime'}}: + {{build.build.timestamp | date:'shortTime'}}: {{{true: 'SUCCESS', false: 'FAILURE'}[build.build.success]}}

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 @@

Recent builds

- + @@ -70,7 +70,7 @@
{{build.createdDate | date:'medium'}}{{build.timestamp | date:'medium'}} {{{true: 'Success', false: 'Failure'}[build.success]}} Details
- + 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 @@ - + 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 @@ - + -- cgit v1.2.3
- {{build.createdDate | date:'shortTime'}}: + {{build.timestamp | date:'shortTime'}}: {{{true: 'SUCCESS', false: 'FAILURE'}[build.success]}} @@ -100,7 +100,7 @@
{{build.createdDate | date:'medium'}}{{build.timestamp | date:'medium'}}
Timestamp{{details.build.createdDate | date:'medium'}}{{details.build.timestamp | date:'medium'}}
Number
{{build.createdDate | date:'medium'}}{{build.timestamp | date:'medium'}} {{build.result}}