From dd0bc0ec171a16830e8b3e6b808a4977c06b3109 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Mon, 21 Sep 2015 17:34:19 -0400 Subject: [PATCH 1/2] rebranding and notice in ui login support --- awx/ui/client/legacy-styles/ansible-ui.less | 4 ++++ awx/ui/client/src/config.js | 3 ++- .../src/login/authentication.controller.js | 5 +++++ .../client/src/login/loginModal.partial.html | 3 ++- .../src/login/loginMotalNotice.block.less | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 awx/ui/client/src/login/loginMotalNotice.block.less diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less index 2dfc7682e6..72cf89fe70 100644 --- a/awx/ui/client/legacy-styles/ansible-ui.less +++ b/awx/ui/client/legacy-styles/ansible-ui.less @@ -2031,3 +2031,7 @@ button.dropdown-toggle, .input-group-btn { z-index: 1; } + +#login-modal-body { + padding-bottom: 5px; +} diff --git a/awx/ui/client/src/config.js b/awx/ui/client/src/config.js index e8e036cee2..c1a6c4008a 100644 --- a/awx/ui/client/src/config.js +++ b/awx/ui/client/src/config.js @@ -27,7 +27,8 @@ $.fn.systemTrackingDP = datepicker; return { - + // custom_logo: "example.png", // utilize a custom logo, see documentation for how to get the server to serve your logo to the browser + // custom_login_info: "example notice" // have a notice displayed in the login modal for users. note that, as a security measure, custom html is not supported and will be escaped. tooltip_delay: {show: 500, hide: 100}, // Default number of milliseconds to delay displaying/hiding tooltips debug_mode: false, // Enable console logging messages diff --git a/awx/ui/client/src/login/authentication.controller.js b/awx/ui/client/src/login/authentication.controller.js index 1bd4d91175..f8b3c27c46 100644 --- a/awx/ui/client/src/login/authentication.controller.js +++ b/awx/ui/client/src/login/authentication.controller.js @@ -111,6 +111,11 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope', '$l setLoginFocus(); }); + scope.customLogo = $AnsibleConfig.custom_logo || "tower_console_logo.png"; + + scope.customLoginInfo = $AnsibleConfig.custom_login_info; + scope.customLoginInfoPresent = (scope.custom_login_info) ? true : false; + // Reset the login form //scope.loginForm.login_username.$setPristine(); //scope.loginForm.login_password.$setPristine(); diff --git a/awx/ui/client/src/login/loginModal.partial.html b/awx/ui/client/src/login/loginModal.partial.html index e6bd3215c1..75474eb7dc 100644 --- a/awx/ui/client/src/login/loginModal.partial.html +++ b/awx/ui/client/src/login/loginModal.partial.html @@ -4,7 +4,7 @@ +
Notice
{{ customLoginInfo | sanitize }}