From 6fa3872c864da4d5c88fe3ea2201dee20b058796 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Tue, 18 Jul 2017 14:39:56 -0400 Subject: [PATCH] Add kind column to credential list * Populate kind column with credential_type name * Fix replace/revert input group button sizing --- .../client/features/credentials/legacy.credentials.js | 5 ++++- awx/ui/client/lib/components/input/_index.less | 8 +++++++- awx/ui/client/lib/components/input/secret.directive.js | 2 ++ awx/ui/client/lib/components/input/secret.partial.html | 6 +++++- awx/ui/client/lib/theme/_mixins.less | 3 +-- awx/ui/client/src/credentials/credentials.list.js | 5 ++--- .../credentials/list/credentials-list.controller.js | 10 +++++++--- 7 files changed, 28 insertions(+), 11 deletions(-) diff --git a/awx/ui/client/features/credentials/legacy.credentials.js b/awx/ui/client/features/credentials/legacy.credentials.js index 95cda7e94a..b6cb9ffa51 100644 --- a/awx/ui/client/features/credentials/legacy.credentials.js +++ b/awx/ui/client/features/credentials/legacy.credentials.js @@ -35,7 +35,10 @@ function LegacyCredentialsService (pathService) { let path = GetBasePath(list.basePath) || GetBasePath(list.name); return qs.search(path, $stateParams[`${list.iterator}_search`]); } - ] + ], + credentialType: ['CredentialTypeModel', CredentialType => { + return new CredentialType('get'); + }] } }; diff --git a/awx/ui/client/lib/components/input/_index.less b/awx/ui/client/lib/components/input/_index.less index 7ac1b4c392..087eaddfcb 100644 --- a/awx/ui/client/lib/components/input/_index.less +++ b/awx/ui/client/lib/components/input/_index.less @@ -47,12 +47,18 @@ .at-mixin-InputButton(); } -.at-Input-button--fixed-sm { +.at-Input-button--fixed-xs { .at-mixin-InputButton(); min-width: @at-width-input-button-sm; height: @at-height-input; } +.at-Input-button--fixed-sm { + .at-mixin-InputButton(); + min-width: @at-width-input-button-md; + height: @at-height-input; +} + .at-Input-button--fixed-md { .at-mixin-InputButton(); display: inherit; diff --git a/awx/ui/client/lib/components/input/secret.directive.js b/awx/ui/client/lib/components/input/secret.directive.js index 3a5f02df33..5a0a9876e2 100644 --- a/awx/ui/client/lib/components/input/secret.directive.js +++ b/awx/ui/client/lib/components/input/secret.directive.js @@ -20,11 +20,13 @@ function AtInputSecretController (baseInputController) { scope = _scope_; if (!scope.state._value || scope.state._promptOnLaunch) { + scope.mode = 'input'; scope.state._buttonText = vm.strings.get('SHOW'); scope.type = 'password'; vm.toggle = vm.toggleShowHide; } else { + scope.mode = 'encrypted'; scope.state._buttonText = vm.strings.get('REPLACE'); scope.state._placeholder = vm.strings.get('ENCRYPTED'); vm.toggle = vm.toggleRevertReplace; diff --git a/awx/ui/client/lib/components/input/secret.partial.html b/awx/ui/client/lib/components/input/secret.partial.html index b3d0026d40..2c1523e7e6 100644 --- a/awx/ui/client/lib/components/input/secret.partial.html +++ b/awx/ui/client/lib/components/input/secret.partial.html @@ -4,7 +4,11 @@
-