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.js16
1 files changed, 14 insertions, 2 deletions
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);
+ };
}