Skip to content

Commit

Permalink
Test mode requires to user baseUrlSrv to connect to the REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
hayssams committed Jan 4, 2016
1 parent 96ec240 commit 1372231
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions zeppelin-web/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@
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
});
}

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);
});

}());

0 comments on commit 1372231

Please sign in to comment.