From 0ae30d14e907aa511c6d76fcaccd050a0a001a14 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 2 Jun 2016 16:04:38 -0700 Subject: [PATCH] Starting timer after config response returns b/c timer depends on the 'auth-token-timeout' from the /config response --- awx/ui/client/src/app.js | 8 ++++---- .../src/login/authenticationServices/timer.factory.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 2be0d724ca..dc5b4baadc 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -872,10 +872,10 @@ var tower = angular.module('Tower', [ $rootScope.user_is_superuser = Authorization.getUserInfo('is_superuser'); // state the user refreshes we want to open the socket, except if the user is on the login page, which should happen after the user logs in (see the AuthService module for that call to OpenSocket) if(!_.contains($location.$$url, '/login')){ - Timer.init().then(function(timer){ - $rootScope.sessionTimer = timer; - $rootScope.$emit('OpenSocket'); - ConfigService.getConfig().then(function(){ + ConfigService.getConfig().then(function(){ + Timer.init().then(function(timer){ + $rootScope.sessionTimer = timer; + $rootScope.$emit('OpenSocket'); pendoService.issuePendoIdentity(); CheckLicense.test(); FeaturesService.get(); diff --git a/awx/ui/client/src/login/authenticationServices/timer.factory.js b/awx/ui/client/src/login/authenticationServices/timer.factory.js index 0a4163f492..3cb82cbd57 100644 --- a/awx/ui/client/src/login/authenticationServices/timer.factory.js +++ b/awx/ui/client/src/login/authenticationServices/timer.factory.js @@ -62,7 +62,7 @@ export default now = new Date().getTime()/1000, diff = stime-now; - if(diff < 61){ + if(diff < 60){ return diff; } else {