From 6a1128135520affd8e721011767f2b3b6938fcf9 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 14 Feb 2019 20:25:50 -0500 Subject: [PATCH] Show last login along with the badges on the user view screen. --- awx/ui/client/legacy/styles/forms.less | 12 ++++++++++++ awx/ui/client/src/shared/form-generator.js | 2 ++ awx/ui/client/src/users/add/users-add.controller.js | 1 + .../client/src/users/edit/users-edit.controller.js | 1 + 4 files changed, 16 insertions(+) diff --git a/awx/ui/client/legacy/styles/forms.less b/awx/ui/client/legacy/styles/forms.less index 9270be7c19..22cd14ac27 100644 --- a/awx/ui/client/legacy/styles/forms.less +++ b/awx/ui/client/legacy/styles/forms.less @@ -75,6 +75,18 @@ text-transform: uppercase; } +.Form-title--last_login { + border-radius: 5px; + color: @default-interface-txt; + font-size: 10px; + font-weight: 100; + height:15px; + margin-left: 10px; + margin-top: 2.25px; + padding: 0 10px; + text-transform: uppercase; +} + .Form-exitHolder { justify-content: flex-end; display:flex; diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js index 4ba0f3890a..401a1f11f9 100644 --- a/awx/ui/client/src/shared/form-generator.js +++ b/awx/ui/client/src/shared/form-generator.js @@ -1418,6 +1418,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat "ng-show='ldap_user'>LDAP"; html+= "{{external_account}}"; + html+= "" + i18n._("Last logged in: ") + "{{ last_login | longDate }}"; } if(this.form.name === "smartinventory"){ html+= " 0) ? true : false; + $scope.last_login = user_obj.last_login; $scope.external_account = user_obj.external_account; $scope.user_type = $scope.user_type_options[0];