From 5fb27ff9c31557777fa0a038d5ed3c688d60e4ef Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Fri, 25 Jul 2014 15:38:39 -0400 Subject: [PATCH] local_config Load what's in local storage, if anything, while waiting for external file to load. --- awx/ui/static/js/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 712cdb72be..632931109a 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -409,9 +409,9 @@ angular.module('Tower', [ }]) .run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'ViewLicense', - 'Timer', 'ClearScope', 'HideStream', 'Socket', 'LoadConfig', + 'Timer', 'ClearScope', 'HideStream', 'Socket', 'LoadConfig', 'Store', function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, ViewLicense, - Timer, ClearScope, HideStream, Socket, LoadConfig) { + Timer, ClearScope, HideStream, Socket, LoadConfig, Store) { var e, html, sock, checkCount = 0; @@ -590,6 +590,11 @@ angular.module('Tower', [ }, 5000); }); + if (!$AnsibleConfig) { + // there may be leg time loading the config file, so temporarily use what's in local storage + $AnsibleConfig = Store('AnsibleConfig'); + } + LoadConfig(); } ]);