aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/webapp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-18 16:40:40 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-18 16:40:40 +0100
commit34546b9c5b5a9be2180e8b4801b72a48feb94d1d (patch)
treeb0cc7cb6fadaf640f6bb5dd7b062192100c6a944 /src/main/resources/webapp
parent2baff5fc9a0564c5e150cf10a1cfd2edd5b3d868 (diff)
downloadesper-testing-34546b9c5b5a9be2180e8b4801b72a48feb94d1d.tar.gz
esper-testing-34546b9c5b5a9be2180e8b4801b72a48feb94d1d.tar.bz2
esper-testing-34546b9c5b5a9be2180e8b4801b72a48feb94d1d.tar.xz
esper-testing-34546b9c5b5a9be2180e8b4801b72a48feb94d1d.zip
o timestamp => createdDate in the JSON to be consistent.
o Better builds list. o Renaming person-avatar to avatar-xl.
Diffstat (limited to 'src/main/resources/webapp')
-rwxr-xr-xsrc/main/resources/webapp/apps/app.js2
-rwxr-xr-xsrc/main/resources/webapp/apps/buildApp/build.html2
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/badgeList.html2
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/build.html2
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/buildList.html42
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/frontPageApp.js42
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/person.html6
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/personList.html2
-rwxr-xr-x[-rw-r--r--]src/main/resources/webapp/apps/jenkinsApp/build.html2
-rwxr-xr-xsrc/main/resources/webapp/apps/jenkinsApp/job.html2
10 files changed, 59 insertions, 45 deletions
diff --git a/src/main/resources/webapp/apps/app.js b/src/main/resources/webapp/apps/app.js
index df540f8..a1fd343 100755
--- a/src/main/resources/webapp/apps/app.js
+++ b/src/main/resources/webapp/apps/app.js
@@ -86,7 +86,7 @@ directives.directive('personLink', function () {
}
});
-directives.directive('personAvatar', function () {
+directives.directive('avatarXl', function () {
return {
restrict: 'E',
scope: {
diff --git a/src/main/resources/webapp/apps/buildApp/build.html b/src/main/resources/webapp/apps/buildApp/build.html
index fec38d2..2a24b16 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.timestamp | date:'medium'}}</td>
+ <td>{{build.build.createdDate | date:'medium'}}</td>
</tr>
<tr>
<th>Status</th>
diff --git a/src/main/resources/webapp/apps/frontPageApp/badgeList.html b/src/main/resources/webapp/apps/frontPageApp/badgeList.html
index 6b795bd..c7f1714 100755
--- a/src/main/resources/webapp/apps/frontPageApp/badgeList.html
+++ b/src/main/resources/webapp/apps/frontPageApp/badgeList.html
@@ -27,7 +27,7 @@
</div>
<div class="span12">
<div class="awarded-badge pull-left" ng-repeat="badge in group">
- <div><person-avatar person="badge.person"></person-avatar></div>
+ <div><avatar-xl person="badge.person"></avatar-xl></div>
<badge-span badge="badge.badge" ></badge-span> <br/>
<a href="/#/badge/{{badge.badge.uuid}}">More</a>
diff --git a/src/main/resources/webapp/apps/frontPageApp/build.html b/src/main/resources/webapp/apps/frontPageApp/build.html
index 0972758..cbf8f8e 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.timestamp | date:'medium'}}</td>
+ <td>{{build.build.createdDate | 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 8fb4a60..ddbffe2 100755
--- a/src/main/resources/webapp/apps/frontPageApp/buildList.html
+++ b/src/main/resources/webapp/apps/frontPageApp/buildList.html
@@ -16,26 +16,32 @@
}
</style>
- <div class="row" ng-repeat="build in builds.rows">
- <div class="span12">
- <h3>
- {{build.build.timestamp | date:'medium'}}:
- <span class="success" ng-show="build.build.success">SUCCESS</span>
- <span class="error" ng-hide="build.build.success">FAILURE</span>
- <a class="btn" href="#/build/{{build.build.uuid}}"><i class="icon-chevron-right"></i></a>
- </h3>
-
- <!--
- <h4>Participants</h4>
- -->
- <span ng-repeat="p in build.participants">
- <dogtag-xl person="p"></dogtag-xl>
- </span>
- </div>
- </div>
-
<div class="row">
<div class="span12">
+ <div class="row" ng-repeat="g in buildGroups">
+ <x ng-repeat="(date, group) in g">
+ <div class="span12">
+ <h2>{{date | date:'mediumDate'}}</h2>
+ </div>
+ <div class="span12">
+ <table class="table">
+ <tr ng-repeat="build in group" class="{{{true: 'success', false: 'error'}[build.build.success]}}">
+ <td>
+ <h4>
+ {{build.build.createdDate | date:'shortTime'}}:
+ {{{true: 'SUCCESS', false: 'FAILURE'}[build.build.success]}}
+ </h4>
+
+ <span ng-repeat="p in build.participants">
+ <dogtag-xl person="p"></dogtag-xl>
+ </span>
+ <a class="btn pull-right" href="#/build/{{build.build.uuid}}"><i class="icon-chevron-right"></i></a>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </x>
+ </div>
<ul class="pager">
<li class="previous" ng-show="builds.startIndex > 0">
<a ng-click="builds.prev()">&larr; Prev</a>
diff --git a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
index fb3c22c..be048d4 100755
--- a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
+++ b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
@@ -34,25 +34,26 @@ function groupBy(array, size) {
return groups;
}
-function BadgeListCtrl($scope, Badge, PagingTableService) {
- var personsWatcher = function () {
- var withDay = _.map($scope.badges.rows, function(badge) {
- badge.day = new Date(badge.badge.createdDate).clearTime().getTime();
-// badge.day.clearTime();
- return badge;
- });
+function groupByDay(array, accessor) {
+ var withDay = _.map(array, function(item) {
+ item.day = new Date(accessor(item)).clearTime().getTime();
+ return item;
+ });
- var byDay = _.groupBy(withDay, 'day');
-// console.log("byDay", byDay);
+ var byDay = _.groupBy(withDay, 'day');
- byDay = _.map(byDay, function(value, key) {
- var o = {};
- o[key] = value;
- return o;
- });
+ byDay = _.map(byDay, function(value, key) {
+ var o = {};
+ o[key] = value;
+ return o;
+ });
-// byDay = _.toArray(byDay).reverse();
-// console.log("byDay", byDay);
+ return byDay;
+}
+
+function BadgeListCtrl($scope, Badge, PagingTableService) {
+ var personsWatcher = function () {
+ var byDay = groupByDay($scope.badges.rows, function(badge) { return badge.badge.createdDate});
$scope.badgeGroups = byDay;
};
@@ -121,7 +122,14 @@ function PersonCtrl($scope, $routeParams, Person, Build, JenkinsUser, PagingTabl
}
function BuildListCtrl($scope, Build, PagingTableService) {
- $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {fields: "detailed"}));
+ var watcher = function () {
+ $scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.build.createdDate});
+ };
+
+ $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {fields: "detailed"}),
+ { count: 100, watcher: watcher });
+
+ $scope.buildGroups = [];
}
function BuildCtrl($scope, $routeParams, Build, PagingTableService) {
diff --git a/src/main/resources/webapp/apps/frontPageApp/person.html b/src/main/resources/webapp/apps/frontPageApp/person.html
index 5da1b20..aef245d 100755
--- a/src/main/resources/webapp/apps/frontPageApp/person.html
+++ b/src/main/resources/webapp/apps/frontPageApp/person.html
@@ -3,7 +3,7 @@
<navbar/>
<div class="page-header">
- <h1><person-avatar person="person.person"></person-avatar> {{person.person.name}}</h1>
+ <h1><avatar-xl person="person.person"></avatar-xl> {{person.person.name}}</h1>
</div>
<ul class="nav nav-tabs">
@@ -49,7 +49,7 @@
<table class="table">
<tbody>
<tr ng-repeat="build in recentBuilds" class="{{{true: 'success', false: 'error'}[build.success]}}">
- <td>{{build.timestamp | date:'medium'}}</td>
+ <td>{{build.createdDate | date:'medium'}}</td>
<td>{{{true: 'Success', false: 'Failure'}[build.success]}}</td>
<td><a href="#/build/{{build.uuid}}">Details</a></td>
</tr>
@@ -69,7 +69,7 @@
</thead>
<tbody>
<tr ng-repeat="build in builds.rows" class="{{{true: 'build-success', false: 'build-error'}[build.success]}}">
- <td>{{build.timestamp | date:'medium'}}</td>
+ <td>{{build.createdDate | date:'medium'}}</td>
<td>{{build.success}}</td>
<td>
<a class="btn btn-small" href="#/build/{{build.uuid}}"><i class="icon-chevron-right"></i></a>
diff --git a/src/main/resources/webapp/apps/frontPageApp/personList.html b/src/main/resources/webapp/apps/frontPageApp/personList.html
index 9f977ee..d229659 100755
--- a/src/main/resources/webapp/apps/frontPageApp/personList.html
+++ b/src/main/resources/webapp/apps/frontPageApp/personList.html
@@ -44,7 +44,7 @@
<div class="row" ng-repeat="group in personGroups" ng-show="persons.showResults()">
<div class="span3" ng-repeat="person in group" style="padding-bottom: 1em">
<div class="row">
- <person-avatar person="person.person"></person-avatar>
+ <avatar-xl person="person.person"></avatar-xl>
<a href="/#/person/{{person.person.uuid}}">{{person.person.name}}</a>
<br/>
<span ng-repeat="level in person.badges | countBadgeByLevel | gz">
diff --git a/src/main/resources/webapp/apps/jenkinsApp/build.html b/src/main/resources/webapp/apps/jenkinsApp/build.html
index 7239c90..db07f44 100644..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.timestamp | date:'medium'}}</td>
+ <td>{{details.build.createdDate | 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 8942ab7..e0c1a10 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.timestamp | date:'medium'}}</td>
+ <td>{{build.createdDate | 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>