From 554f8225d835c6bca61326ba7bba2eaade98cf0c Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Mon, 8 Jul 2013 14:48:03 -0400 Subject: [PATCH] Fixed bug in login license warning causing the warning to be displayed 2x. --- awx/settings/production.py | 3 +-- awx/ui/static/js/awx-min.js | 6 +++--- awx/ui/static/lib/ansible/authenticate.js | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/awx/settings/production.py b/awx/settings/production.py index 7d3cc97678..722e3bf15c 100644 --- a/awx/settings/production.py +++ b/awx/settings/production.py @@ -22,8 +22,7 @@ SECRET_KEY = None ALLOWED_HOSTS = [] # Production should only use minified JS for UI. -# CLH 6/20/13 - leave the following set to False until we actually have minified js ready -USE_MINIFIED_JS = False +USE_MINIFIED_JS = True # URL used by inventory script and callback plugin to access API. INTERNAL_API_URL = 'http://127.0.0.1:80' diff --git a/awx/ui/static/js/awx-min.js b/awx/ui/static/js/awx-min.js index 0024530eb4..2ea8f268ea 100644 --- a/awx/ui/static/js/awx-min.js +++ b/awx/ui/static/js/awx-min.js @@ -2,9 +2,9 @@ * Copyright (c) 2013 AnsibleWorks, Inc. * All rights reserved * - * ansibleworks-min.js + * awx-min.js * - * master-f0cf62a, Wed Jul 3 18:43:51 2013 -0400 + * master-a774576, Mon Jul 8 13:28:56 2013 -0400 * */ var urlPrefix="/static/"; @@ -284,7 +284,7 @@ icon:"icon-plus",mode:"all",ngClick:"addTeam()","class":"btn-success btn-small", basePaths:["organizations","users"],"class":"btn-success btn-small",awToolTip:"Create a new user"}},fieldActions:{edit:{label:"Edit",ngClick:"editUser({{ user.id }})",icon:"icon-edit","class":"btn-small btn-success",awToolTip:"View/Edit user"},"delete":{label:"Delete",ngClick:"deleteUser({{ user.id }},'{{ user.username }}')",icon:"icon-remove","class":"btn-small btn-danger",awToolTip:"Delete user"}}});angular.module("ApiLoader",["ngCookies"]).factory("LoadBasePaths",["$http","$rootScope","$cookieStore","ProcessErrors",function(h,m,k,g){return function(){h.get("/api/").success(function(c,p,f,e){var l=c.current_version;h.get(l).success(function(a,c,b,e){a.base=l;m.defaultUrls=a;k.remove("api");k.put("api",a)}).error(function(a,c,b,e){m.defaultUrls={status:"error"};g(null,a,c,null,{hdr:"Error",msg:"Failed to read "+l+". GET status: "+c})})}).error(function(c,h,f,e){m.defaultUrls={status:"error"}; g(null,c,h,null,{hdr:"Error",msg:"Failed to read /api. GET status: "+h})})}}]).factory("GetBasePath",["$rootScope","$cookieStore","LoadBasePaths",function(h,m,k){return function(g){null==h.defaultUrls||void 0==h.defaultUrls?(g=m.get("api")[g],k()):g=h.defaultUrls[g];return g}}]);angular.module("AuthService",["ngCookies"]).factory("Authorization",["$http","$rootScope","$location","$cookieStore",function(h,m,k,g){return{setToken:function(c){var h=new Date;h.setTime(h.getTime()+1E3*$AnsibleConfig.session_timeout);g.remove("token");g.remove("token_expire");g.put("token",c);g.put("token_expire",h.getTime());m.userLoggedIn=!0},isTokenValid:function(){var c=!1;if(g.get("token")&&g.get("token_expire")){var h=g.get("token"),f=new Date(g.get("token_expire"));new DateparseInt(m.attr("max"))){g.$setValidity("max",!1);return}return c}g.$setValidity("integer", diff --git a/awx/ui/static/lib/ansible/authenticate.js b/awx/ui/static/lib/ansible/authenticate.js index 7b60635fb6..96bf549595 100644 --- a/awx/ui/static/lib/ansible/authenticate.js +++ b/awx/ui/static/lib/ansible/authenticate.js @@ -84,8 +84,8 @@ angular.module('AuthService', ['ngCookies']) licenseTested: function() { var result; - if ($rootScope.license_test !== undefined) { - result = $rootScope.license_test; + if ($rootScope.license_tested !== undefined) { + result = $rootScope.license_tested; } else { var license = $cookieStore.get('license');