diff options
Diffstat (limited to 'src/main/resources')
-rwxr-xr-x | src/main/resources/webapp/apps/jenkinsApp/build.html | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js | 39 | ||||
-rwxr-xr-x | src/main/resources/webapp/apps/jenkinsApp/job.html | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/resources/webapp/apps/jenkinsApp/server-list.html | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/resources/webapp/apps/jenkinsApp/server.html | 14 |
5 files changed, 26 insertions, 43 deletions
diff --git a/src/main/resources/webapp/apps/jenkinsApp/build.html b/src/main/resources/webapp/apps/jenkinsApp/build.html index 7239c90..13e3b8b 100755 --- a/src/main/resources/webapp/apps/jenkinsApp/build.html +++ b/src/main/resources/webapp/apps/jenkinsApp/build.html @@ -7,9 +7,9 @@ </div> <ul class="breadcrumb"> - <li><a ng-click="showServers()">All Servers</a> <span class="divider">/</span></li> - <li><a ng-click="showServer()">Servers</a> <span class="divider">/</span></li> - <li><a ng-click="showJob()">Job</a> <span class="divider">/</span></li> + <li><a href="/jenkins/#/">All Servers</a> <span class="divider">/</span></li> + <li><a href="/jenkins/#/server/{{serverUuid}}">Server</a> <span class="divider">/</span></li> + <li><a href="/jenkins/#/server/{{serverUuid}}/job/{{jobUuid}}">Job</a> <span class="divider">/</span></li> <li class="active">Build</li> </ul> diff --git a/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js index e42c67b..68344cd 100644..100755 --- a/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js +++ b/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js @@ -3,55 +3,44 @@ var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServer', 'jenkinsJob', 'jenkinsBuild', 'core.directives', 'pagingTableService']).config(function ($routeProvider) { $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('/build/:uuid', {controller: BuildCtrl, templateUrl: '/apps/jenkinsApp/build.html?noCache=' + noCache}); + when('/server/:serverUuid', {controller: ServerCtrl, templateUrl: '/apps/jenkinsApp/server.html?noCache=' + noCache}). + when('/server/:serverUuid/job/:jobUuid', {controller: JobCtrl, templateUrl: '/apps/jenkinsApp/job.html?noCache=' + noCache}). + when('/server/:serverUuid/job/:jobUuid/build/:buildUuid', {controller: BuildCtrl, templateUrl: '/apps/jenkinsApp/build.html?noCache=' + noCache}); }); function ServerListCtrl($scope, $location, JenkinsServer) { JenkinsServer.query(function (servers) { $scope.servers = servers; }); - - $scope.showServers = function () { $location.path('/'); }; - $scope.showServer = function (uuid) { $location.path('/server/' + uuid); }; } function ServerCtrl($scope, $location, $routeParams, JenkinsServer, JenkinsJob, PagingTableService) { - var serverUuid = $routeParams.uuid; + $scope.serverUuid = $routeParams.serverUuid; - JenkinsServer.get({uuid: serverUuid}, function (server) { + JenkinsServer.get({uuid: $scope.serverUuid}, function (server) { $scope.server = server; }); - $scope.jobs = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsJob, {server: serverUuid})); - - $scope.showServers = function () { $location.path('/'); }; - $scope.showJob = function (uuid) { $location.path('/job/' + uuid); }; + $scope.jobs = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsJob, {server: $scope.serverUuid})); } function JobCtrl($scope, $location, $routeParams, JenkinsJob, JenkinsBuild, PagingTableService) { - var jobUuid = $routeParams.uuid; + $scope.serverUuid = $routeParams.serverUuid; + $scope.jobUuid = $routeParams.jobUuid; - JenkinsJob.get({uuid: jobUuid}, function (details) { + JenkinsJob.get({uuid: $scope.jobUuid}, function (details) { $scope.details = details; }); - $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsBuild, {job: jobUuid})); - - $scope.showServers = function () { $location.path('/'); }; - $scope.showServer = function () { $location.path('/server/' + $scope.job.server); }; - $scope.showBuild = function (uuid) { $location.path('/build/' + uuid); }; + $scope.builds = PagingTableService.create($scope, PagingTableService.defaultCallback(JenkinsBuild, {job: $scope.jobUuid, orderBy: "timestamp-"})); } function BuildCtrl($scope, $location, $routeParams, JenkinsBuild) { - var buildUuid = $routeParams.uuid; + $scope.serverUuid = $routeParams.serverUuid; + $scope.jobUuid = $routeParams.jobUuid; + $scope.buildUuid = $routeParams.buildUuid; - JenkinsBuild.get({uuid: buildUuid}, function (details) { + JenkinsBuild.get({uuid: $scope.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); }; } diff --git a/src/main/resources/webapp/apps/jenkinsApp/job.html b/src/main/resources/webapp/apps/jenkinsApp/job.html index 8942ab7..4f21fad 100755 --- a/src/main/resources/webapp/apps/jenkinsApp/job.html +++ b/src/main/resources/webapp/apps/jenkinsApp/job.html @@ -7,8 +7,8 @@ </div> <ul class="breadcrumb"> - <li><a ng-click="showServers()">All Servers</a> <span class="divider">/</span></li> - <li><a ng-click="showServer()">Servers</a> <span class="divider">/</span></li> + <li><a href="/jenkins/#/">All Servers</a> <span class="divider">/</span></li> + <li><a href="/jenkins/#/server/{{serverUuid}}">Server</a> <span class="divider">/</span></li> <li class="active">Job</li> </ul> @@ -18,7 +18,7 @@ <tbody> <tr> <th>URL</th> - <td><a href="{{details.job.displayName}}">{{details.job.displayName}}</a></td> + <td><a href="{{details.job.url}}">{{details.job.displayName}}</a></td> </tr> <tr> <th>Build count</th> @@ -40,7 +40,7 @@ <tr ng-repeat="build in builds.rows" class="{{{true: 'success', false: 'error'}[build.success]}}"> <td>{{build.timestamp | date:'medium'}}</td> <td>{{build.result}}</td> - <td><a class="btn" ng-click="showBuild(build.uuid)"><i class="icon-chevron-right"></i></a></td> + <td><a class="btn" href="/jenkins/#/server/{{serverUuid}}/job/{{jobUuid}}/build/{{build.uuid}}"><i class="icon-chevron-right"></i></a></td> </tr> </tbody> <tfoot> diff --git a/src/main/resources/webapp/apps/jenkinsApp/server-list.html b/src/main/resources/webapp/apps/jenkinsApp/server-list.html index 9e297e6..93e5e9e 100644..100755 --- a/src/main/resources/webapp/apps/jenkinsApp/server-list.html +++ b/src/main/resources/webapp/apps/jenkinsApp/server-list.html @@ -24,7 +24,7 @@ <td>{{server.url}}</td> <td>{{server.enabled}}</td> <td><a href="{{server.url}}">Visit</a></td> - <td><a class="btn" ng-click="showServer(server.uuid)"><i class="icon-chevron-right"></i></a> + <td><a class="btn" href="/jenkins/#/server/{{server.uuid}}"><i class="icon-chevron-right"></i></a> </td> </tr> </tbody> diff --git a/src/main/resources/webapp/apps/jenkinsApp/server.html b/src/main/resources/webapp/apps/jenkinsApp/server.html index 7fbd9f5..fb821d3 100644..100755 --- a/src/main/resources/webapp/apps/jenkinsApp/server.html +++ b/src/main/resources/webapp/apps/jenkinsApp/server.html @@ -8,7 +8,7 @@ </div> <ul class="breadcrumb"> - <li><a ng-click="showServers()">All Servers</a> <span class="divider">/</span></li> + <li><a href="/jenkins/#/">All Servers</a> <span class="divider">/</span></li> <li class="active">Server</li> </ul> @@ -25,24 +25,18 @@ </tr> <tr> <th>Stats</th> - <td>{{server.jobCount}} jobs, {{server.buildCount}} builds</td> + <td>{{server.jobCount}} jobs</td> </tr> </tbody> </table> <h3>Recent Jobs</h3> <table class="table"> - <thead> - <tr> - <th>Job</th> - </tr> - </thead> <tbody> <tr ng-repeat="job in jobs.rows"> - <td>{{job.createdDate | date:'medium'}}</td> <td>{{job.displayName}}</td> - <td>{{job.uuid}}</td> - <td><a class="btn" ng-click="showJob(job.uuid)"><i class="icon-chevron-right"></i></a></td> + <td>{{job.createdDate | date:'medium'}}</td> + <td><a class="btn" href="/jenkins/#/server/{{server.uuid}}/job/{{job.uuid}}"><i class="icon-chevron-right"></i></a></td> </tr> </tbody> <tfoot> |