aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-29 18:59:32 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-04 22:09:16 +0100
commit5ec81d9e77fcb56ddf5953989e23b6cafe4772a3 (patch)
tree63b2d1c262a06bcfb54a6dcb368af032aacc84a2 /src/main/webapp/apps/jenkinsApp/jenkinsApp.js
parent8cce8890eca34fead35ad19a0db6d95dd047b3a6 (diff)
downloadesper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.tar.gz
esper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.tar.bz2
esper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.tar.xz
esper-testing-5ec81d9e77fcb56ddf5953989e23b6cafe4772a3.zip
o Adding build view for jenkins app.
Diffstat (limited to 'src/main/webapp/apps/jenkinsApp/jenkinsApp.js')
-rw-r--r--src/main/webapp/apps/jenkinsApp/jenkinsApp.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
index 19d107d..1cd2d2a 100644
--- a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
+++ b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
@@ -4,7 +4,8 @@ var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServer', 'jenkinsJob', 'j
$routeProvider.
when('/', {controller: ServerListCtrl, templateUrl: '/apps/jenkinsApp/server-list.html?noCache=' + noCache}).
when('/server/:uuid', {controller: ServerCtrl, templateUrl: '/apps/jenkinsApp/server.html?noCache=' + noCache}).
- when('/job/:uuid', {controller: JobCtrl, templateUrl: '/apps/jenkinsApp/job.html?noCache=' + noCache});
+ when('/job/:uuid', {controller: JobCtrl, templateUrl: '/apps/jenkinsApp/job.html?noCache=' + noCache}).
+ when('/build/:uuid', {controller: BuildCtrl, templateUrl: '/apps/jenkinsApp/build.html?noCache=' + noCache});
});
function ServerListCtrl($scope, $location, JenkinsServer) {
@@ -32,12 +33,25 @@ function ServerCtrl($scope, $location, $routeParams, JenkinsServer, JenkinsJob,
function JobCtrl($scope, $location, $routeParams, JenkinsJob, JenkinsBuild, PagingTableService) {
var jobUuid = $routeParams.uuid;
- JenkinsJob.get({uuid: jobUuid}, function (job) {
- $scope.job = job;
+ JenkinsJob.get({uuid: jobUuid}, function (details) {
+ $scope.details = details;
});
$scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsBuild, {job: jobUuid}));
$scope.showServers = function () { $location.path('/'); };
- $scope.showServer = function (uuid) { $location.path('/server/' + $scope.job.server); };
+ $scope.showServer = function () { $location.path('/server/' + $scope.job.server); };
+ $scope.showBuild = function (uuid) { $location.path('/build/' + uuid); };
+}
+
+function BuildCtrl($scope, $location, $routeParams, JenkinsBuild) {
+ var buildUuid = $routeParams.uuid;
+
+ JenkinsBuild.get({uuid: buildUuid}, function (details) {
+ $scope.details = details;
+ });
+
+ $scope.showServers = function () { $location.path('/'); };
+ $scope.showServer = function (uuid) { $location.path('/server/' + $scope.server.uuid); };
+ $scope.showJob = function (uuid) { $location.path('/job/' + $scope.build.job); };
}