aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/webapp/apps/frontPageApp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-22 09:57:54 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-22 09:57:54 +0100
commit813904f035b612a9c61caba97d54f8a803f5a69c (patch)
tree35a1503cc1af61faa1b78ae0c5e7a5a452f93731 /src/main/resources/webapp/apps/frontPageApp
parent6e403ab935f36720b3b954afdf3bbefcbf50bb5c (diff)
downloadesper-testing-813904f035b612a9c61caba97d54f8a803f5a69c.tar.gz
esper-testing-813904f035b612a9c61caba97d54f8a803f5a69c.tar.bz2
esper-testing-813904f035b612a9c61caba97d54f8a803f5a69c.tar.xz
esper-testing-813904f035b612a9c61caba97d54f8a803f5a69c.zip
o Showing links to the Jenkins build on the build page.
Diffstat (limited to 'src/main/resources/webapp/apps/frontPageApp')
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/build.html24
-rwxr-xr-xsrc/main/resources/webapp/apps/frontPageApp/frontPageApp.js8
2 files changed, 25 insertions, 7 deletions
diff --git a/src/main/resources/webapp/apps/frontPageApp/build.html b/src/main/resources/webapp/apps/frontPageApp/build.html
index 0972758..9fa0991 100755
--- a/src/main/resources/webapp/apps/frontPageApp/build.html
+++ b/src/main/resources/webapp/apps/frontPageApp/build.html
@@ -12,17 +12,35 @@
<tbody>
<tr>
<th>Type</th>
- <td>Jenkins</td>
+ <td>
+ <span ng-hide="build.build.serverType">
+ Loading...
+ </span>
+ <ng-switch on="build.build.serverType" ng-show="build.build.serverType">
+ <span ng-switch-when="jenkins">
+ Jenkins
+
+ <a href="/jenkins/#/server/{{jenkinsBuild.build.serverUuid}}/job/{{jenkinsBuild.build.job}}/build/{{jenkinsBuild.build.uuid}}/">visit build</a>
+ </span>
+ <span ng-switch-default>
+ Unknown server type.
+ </span>
+ </ng-switch>
+ </td>
</tr>
<tr>
- <th>Duration</th>
+ <th>Timestamp</th>
<td>{{build.build.timestamp | date:'medium'}}</td>
</tr>
+ <tr>
+ <th>Result</th>
+ <td>{{{true: 'SUCCESS', false: 'FAILURE'}[build.build.success]}}</td>
+ </tr>
</tbody>
</table>
<h2>Participants</h2>
- <span dogtagxl ng-repeat="p in build.participants" person="p"/>
+ <dogtag-xl ng-repeat="p in build.participants" person="p"></dogtag-xl>
</div>
</div>
diff --git a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
index 1004c6f..4633892 100755
--- a/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
+++ b/src/main/resources/webapp/apps/frontPageApp/frontPageApp.js
@@ -1,6 +1,6 @@
'use strict';
-var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'badge', 'build', 'jenkinsUser', 'pagingTableService', 'core.directives']).config(function ($routeProvider) {
+var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'badge', 'build', 'jenkinsUser', 'jenkinsBuild', 'pagingTableService', 'core.directives']).config(function ($routeProvider) {
$routeProvider.
when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}).
when('/badge/', {controller: BadgeListCtrl, templateUrl: '/apps/frontPageApp/badgeList.html?noCache=' + noCache}).
@@ -136,10 +136,10 @@ function BuildListCtrl($scope, Build, PagingTableService) {
{ count: 100, watcher: watcher });
}
-function BuildCtrl($scope, $routeParams, Build, PagingTableService) {
+function BuildCtrl($scope, $routeParams, Build, JenkinsBuild) {
var buildUuid = $routeParams.buildUuid;
- Build.get({uuid: buildUuid}, function (build) {
- $scope.build = build;
+ $scope.build = Build.get({uuid: buildUuid}, function (build) {
+ $scope.jenkinsBuild = JenkinsBuild.get({uuid: build.build.buildUuid});
});
}