aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps/jenkinsApp/jenkinsApp.js
diff options
context:
space:
mode:
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); };
}