aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources')
-rwxr-xr-xsrc/main/resources/webapp/apps/app.js2
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/frontPageApp.js19
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/person.html39
3 files changed, 47 insertions, 13 deletions
diff --git a/src/main/resources/webapp/apps/app.js b/src/main/resources/webapp/apps/app.js
index a1fd343..69106aa 100755
--- a/src/main/resources/webapp/apps/app.js
+++ b/src/main/resources/webapp/apps/app.js
@@ -87,6 +87,8 @@ directives.directive('personLink', function () {
});
directives.directive('avatarXl', function () {
+ // TODO: set height="" and width=""
+ // TODO: do not return a useful url unless person.gravatar is set.
return {
restrict: 'E',
scope: {
diff --git a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
index be048d4..c376f83 100755
--- a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
+++ b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
@@ -77,20 +77,23 @@ function PersonListCtrl($scope, Person, PagingTableService) {
$scope.personGroups = groupBy($scope.persons.rows, groupSize);
};
+ $scope.personGroups = [];
$scope.persons = PagingTableService.create($scope, PagingTableService.defaultCallback(Person, {orderBy: "name"}),
{count: groupSize * rows, watcher: personsWatcher});
-
- console.log("$scope.persons.searchText", $scope.persons.searchText);
- console.log("$scope.persons.rows", $scope.persons.rows);
-
- $scope.personGroups = [];
}
function PersonCtrl($scope, $routeParams, Person, Build, JenkinsUser, PagingTableService) {
var personUuid = $routeParams.personUuid;
$scope.mode = 'overview';
- $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {person: personUuid}), {count: 100});
+
+ var watcher = function () {
+ $scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.createdDate});
+ console.log("$scope.buildGroups", $scope.buildGroups);
+ };
+ $scope.buildGroups = [];
+ $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {person: personUuid}),
+ {count: 50, watcher: watcher});
$scope.setMode = function(mode) {
$scope.mode = mode;
@@ -98,7 +101,6 @@ function PersonCtrl($scope, $routeParams, Person, Build, JenkinsUser, PagingTabl
case 'builds':
var builds = $scope.builds;
- console.log("$scope.builds.length=" + builds.rows.length);
if (builds.rows.length == 0) {
$scope.builds.first();
}
@@ -126,10 +128,9 @@ function BuildListCtrl($scope, Build, PagingTableService) {
$scope.buildGroups = groupByDay($scope.builds.rows, function(build) { return build.build.createdDate});
};
+ $scope.buildGroups = [];
$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 aef245d..f88a7d0 100755
--- a/src/main/resources/webapp/apps/frontPageApp/person.html
+++ b/src/main/resources/webapp/apps/frontPageApp/person.html
@@ -47,7 +47,6 @@
<div class="span6">
<h3>Recent builds</h3>
<table class="table">
- <tbody>
<tr ng-repeat="build in recentBuilds" class="{{{true: 'success', false: 'error'}[build.success]}}">
<td>{{build.createdDate | date:'medium'}}</td>
<td>{{{true: 'Success', false: 'Failure'}[build.success]}}</td>
@@ -60,17 +59,48 @@
<div id="builds" ng-show="mode == 'builds'">
<h3>Builds</h3>
+ <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.success]}}">
+ <td>
+ {{build.createdDate | date:'shortTime'}}:
+ {{{true: 'SUCCESS', false: 'FAILURE'}[build.success]}}
+
+ <a class="btn pull-right" href="#/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>
+ </li>
+ <li class="next">
+ <a ng-click="builds.next()">Next &rarr;</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+<!--
<table class="table text-baseline">
<thead>
<tr>
<th>Date</th>
- <th>Success</th>
+ <th></th>
</tr>
</thead>
<tbody>
- <tr ng-repeat="build in builds.rows" class="{{{true: 'build-success', false: 'build-error'}[build.success]}}">
+ <tr ng-repeat="build in builds.rows" class="{{{true: 'success', false: 'error'}[build.success]}}">
<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>
</td>
@@ -91,6 +121,7 @@
</tr>
</tfoot>
</table>
+-->
</div>
<div id="jenkins" ng-show="mode == 'jenkins'">