From 1372231743b7cdbadca3cf914b3c9492610057c9 Mon Sep 17 00:00:00 2001 From: Hayssam Saleh Date: Mon, 4 Jan 2016 18:11:12 +0100 Subject: [PATCH] Test mode requires to user baseUrlSrv to connect to the REST API --- zeppelin-web/src/app/app.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zeppelin-web/src/app/app.js b/zeppelin-web/src/app/app.js index 54555c899e7..d1f375345c5 100644 --- a/zeppelin-web/src/app/app.js +++ b/zeppelin-web/src/app/app.js @@ -82,12 +82,11 @@ function auth() { var initInjector = angular.injector(['ng']); var $http = initInjector.get('$http'); + var baseUrlSrv = angular.injector(['zeppelinWebApp']).get('baseUrlSrv'); - return $http.get('/api/security/ticket').then(function(response) { + return $http.get(baseUrlSrv.getRestApiBase()+'/security/ticket').then(function(response) { zeppelinWebApp.run(function($rootScope) { - console.log(response); $rootScope.ticket = angular.fromJson(response.data).body; - console.log($rootScope.ticket); }); }, function(errorResponse) { // Handle error case @@ -95,12 +94,13 @@ } function bootstrapApplication() { - angular.element(document).ready(function() { - angular.bootstrap(document, ['zeppelinWebApp']); - }); + angular.bootstrap(document, ['zeppelinWebApp']); } - auth().then(bootstrapApplication); + + angular.element(document).ready(function() { + auth().then(bootstrapApplication); + }); }());