From ee86231bc83d50505fca356f808bc7d13a2c9502 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 20 Dec 2012 10:53:48 +0100 Subject: o Adding breadcrumbs for easier navigation. --- src/main/webapp/apps/jenkinsApp/jenkinsApp.js | 16 ++++++++++++++-- src/main/webapp/apps/jenkinsApp/server-list.html | 5 +++++ src/main/webapp/apps/jenkinsApp/server.html | 11 ++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) (limited to 'src/main/webapp/apps/jenkinsApp') diff --git a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js index 5370496..5477039 100644 --- a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js +++ b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js @@ -11,19 +11,31 @@ var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServerService']).config(f // $locationProvider.html5Mode(true); }); -function ServerListCtrl($scope, $route, $routeParams, $location, JenkinsServerService) { +function ServerListCtrl($scope, $location, JenkinsServerService) { JenkinsServerService.query(function (servers) { $scope.servers = servers; }); + $scope.showServers = function (uuid) { + $location.path('/'); + }; + $scope.showServer = function (uuid) { $location.path('/server/' + uuid); }; } -function ServerCtrl($scope, $routeParams, JenkinsServerService) { +function ServerCtrl($scope, $location, $routeParams, JenkinsServerService) { window.x = $routeParams; JenkinsServerService.get({uuid: $routeParams.uuid}, function (server) { $scope.server = server; }); + + $scope.showServers = function (uuid) { + $location.path('/'); + }; + + $scope.showServer = function (uuid) { + $location.path('/server/' + uuid); + }; } diff --git a/src/main/webapp/apps/jenkinsApp/server-list.html b/src/main/webapp/apps/jenkinsApp/server-list.html index 0ca65d6..f335c1f 100644 --- a/src/main/webapp/apps/jenkinsApp/server-list.html +++ b/src/main/webapp/apps/jenkinsApp/server-list.html @@ -1,6 +1,11 @@ + + + diff --git a/src/main/webapp/apps/jenkinsApp/server.html b/src/main/webapp/apps/jenkinsApp/server.html index e15f43e..9213c73 100644 --- a/src/main/webapp/apps/jenkinsApp/server.html +++ b/src/main/webapp/apps/jenkinsApp/server.html @@ -2,6 +2,11 @@

Jenkins Server

+ +
@@ -14,7 +19,11 @@ - + + + + +
Visit{{server.visit}}{{server.url}}
Job Count{{server.jobCount}}
-- cgit v1.2.3