From 2ceb3c6dbda2594f6c17c6f9ce32fe0d44adea1a Mon Sep 17 00:00:00 2001 From: denz Date: Tue, 1 Dec 2015 10:09:55 +0900 Subject: [PATCH] Add 302 redirect code. --- web/src/main/webapp/scripts/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/main/webapp/scripts/app.js b/web/src/main/webapp/scripts/app.js index c4978fbb8425..a6b9de032619 100644 --- a/web/src/main/webapp/scripts/app.js +++ b/web/src/main/webapp/scripts/app.js @@ -61,9 +61,14 @@ pinpointApp.config(['$routeProvider', '$locationProvider', '$modalProvider', fun pinpointApp.value("globalConfig", {}); -pinpointApp.run([ '$rootScope', '$timeout', '$modal', '$location', '$cookies', '$interval', '$http', 'globalConfig', - function ($rootScope, $timeout, $modal, $location, $cookies, $interval, $http, globalConfig) { +pinpointApp.run([ '$rootScope', '$window', '$timeout', '$modal', '$location', '$cookies', '$interval', '$http', 'globalConfig', + function ($rootScope, $window, $timeout, $modal, $location, $cookies, $interval, $http, globalConfig) { $http.get('/configuration.pinpoint').then(function(result) { + if ( result.data.errorCode == 302 ) { + $window.location = result.data.redirect; + return; + } + for( var p in result.data ) { globalConfig[p] = result.data[p]; }