aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps/frontPageApp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-09 17:04:10 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-09 17:04:10 +0100
commitbc54871dac7ef10102edecf91a747d6595a4640f (patch)
tree4cf4aaf0875497359534a9521ba785a7476fa7a5 /src/main/webapp/apps/frontPageApp
parent8f027c74517e1cf2c8fc13f86da80e8e8f1c0148 (diff)
downloadesper-testing-bc54871dac7ef10102edecf91a747d6595a4640f.tar.gz
esper-testing-bc54871dac7ef10102edecf91a747d6595a4640f.tar.bz2
esper-testing-bc54871dac7ef10102edecf91a747d6595a4640f.tar.xz
esper-testing-bc54871dac7ef10102edecf91a747d6595a4640f.zip
o Adding basic build list in the front page application.
Diffstat (limited to 'src/main/webapp/apps/frontPageApp')
-rwxr-xr-xsrc/main/webapp/apps/frontPageApp/buildList.html50
-rwxr-xr-xsrc/main/webapp/apps/frontPageApp/frontPageApp.js7
-rwxr-xr-xsrc/main/webapp/apps/frontPageApp/person.html2
3 files changed, 57 insertions, 2 deletions
diff --git a/src/main/webapp/apps/frontPageApp/buildList.html b/src/main/webapp/apps/frontPageApp/buildList.html
new file mode 100755
index 0000000..13a1dc3
--- /dev/null
+++ b/src/main/webapp/apps/frontPageApp/buildList.html
@@ -0,0 +1,50 @@
+<div class="container">
+
+ <navbar/>
+
+ <div class="page-header">
+ <h1>Builds</h1>
+ </div>
+
+ <style>
+ .avatar-image {
+ /* This has to match bootstrap's row margin. */
+ margin-left: 30px;
+ padding-right: 1em;
+ float: left;
+ margin-top: 0;
+ }
+ </style>
+
+ <div class="row">
+ <div class="span12">
+ <table class="table">
+ <tbody ng-repeat="build in builds.rows">
+ <tr class="{{{true: 'success', false: 'error'}[build.build.success]}}">
+ <td>{{build.build.timestamp | date:'medium'}}</td>
+ <td>
+ <span ng-show="build.build.success">SUCCESS</span>
+ <span ng-hide="build.build.success">FAILURE</span>
+ </td>
+ <td><a class="btn" href="/build/{{build.build.uuid}}"><i class="icon-chevron-right"></i></a></td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <span ng-repeat="p in build.participants">
+ <person-avatar person="p"/>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <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>
+</div>
diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js
index 5f1cf2c..a67e2dc 100755
--- a/src/main/webapp/apps/frontPageApp/frontPageApp.js
+++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js
@@ -5,7 +5,8 @@ var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'badge',
when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}).
when('/badge/', {controller: BadgeListCtrl, templateUrl: '/apps/frontPageApp/badgeList.html?noCache=' + noCache}).
when('/person/', {controller: PersonListCtrl, templateUrl: '/apps/frontPageApp/personList.html?noCache=' + noCache}).
- when('/person/:personUuid', {controller: PersonCtrl, templateUrl: '/apps/frontPageApp/person.html?noCache=' + noCache});
+ when('/person/:personUuid', {controller: PersonCtrl, templateUrl: '/apps/frontPageApp/person.html?noCache=' + noCache}).
+ when('/build/', {controller: BuildListCtrl, templateUrl: '/apps/frontPageApp/buildList.html?noCache=' + noCache});
});
function FrontPageCtrl($scope, Person, Badge) {
@@ -95,3 +96,7 @@ function PersonCtrl($scope, $routeParams, Person, Build, PagingTableService) {
$scope.recentBuilds = builds;
});
}
+
+function BuildListCtrl($scope, Build, PagingTableService) {
+ $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(Build, {fields: "detailed"}));
+}
diff --git a/src/main/webapp/apps/frontPageApp/person.html b/src/main/webapp/apps/frontPageApp/person.html
index 0ca5679..ba5c18d 100755
--- a/src/main/webapp/apps/frontPageApp/person.html
+++ b/src/main/webapp/apps/frontPageApp/person.html
@@ -76,7 +76,7 @@
</tr>
</thead>
<tbody>
- <tr ng-repeat="build in builds.rows" class="{{{true: 'success', false: 'error'}[build.success]}}">
+ <tr ng-repeat="build in builds.rows" class="{{{true: 'build-success', false: 'build-error'}[build.success]}}">
<td>{{build.timestamp | date:'medium'}}</td>
<td>{{build.success}}</td>
</tr>