mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Credential UX audit cleanup
This commit is contained in:
parent
1f31a49cbb
commit
094b696fdc
@ -422,6 +422,19 @@ textarea.allowresize {
|
||||
max-width: 325px;
|
||||
background-color: @default-interface-txt;
|
||||
color: @default-bg; //white
|
||||
|
||||
code {
|
||||
color: #161b1f;
|
||||
background-color: #e1e1e1;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: @default-warning;
|
||||
&:hover {
|
||||
color: @default-warning-hov;
|
||||
}
|
||||
}
|
||||
}
|
||||
.popover.right>.arrow:after {
|
||||
border-right-color: @default-interface-txt;
|
||||
|
||||
@ -200,6 +200,11 @@
|
||||
|
||||
.Form-textAreaLabel{
|
||||
width:100%;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.Form-formGroup.Form-textAreaLabel {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.Form-textArea{
|
||||
|
||||
@ -422,6 +422,10 @@ var tower = angular.module('Tower', [
|
||||
controller: CredentialsEdit,
|
||||
data: {
|
||||
activityStreamId: 'credential_id'
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: "credentials",
|
||||
label: "EDIT CREDENTIAL"
|
||||
}
|
||||
}).
|
||||
|
||||
@ -742,12 +746,12 @@ var tower = angular.module('Tower', [
|
||||
// remove any lingering intervals
|
||||
// except on jobDetails.* states
|
||||
var jobDetailStates = [
|
||||
'jobDetail',
|
||||
'jobDetail.host-summary',
|
||||
'jobDetail',
|
||||
'jobDetail.host-summary',
|
||||
'jobDetail.host-event.details',
|
||||
'jobDetail.host-event.json',
|
||||
'jobDetail.host-event.json',
|
||||
'jobDetail.host-events',
|
||||
'jobDetail.host-event.stdout'
|
||||
'jobDetail.host-event.stdout'
|
||||
];
|
||||
if ($rootScope.jobDetailInterval && !_.includes(jobDetailStates, next.name) ) {
|
||||
window.clearInterval($rootScope.jobDetailInterval);
|
||||
|
||||
@ -15,7 +15,6 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
||||
$stateParams, Rest, Alert, CredentialList, GenerateList, Prompt, SearchInit,
|
||||
PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath,
|
||||
SelectionInit, GetChoices, Wait, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
Wait('start');
|
||||
@ -33,7 +32,6 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
||||
$scope.credentialLoading = true;
|
||||
|
||||
url = GetBasePath(base) + ( (base === 'users') ? $stateParams.user_id + '/credentials/' : $stateParams.team_id + '/credentials/' );
|
||||
|
||||
if (mode === 'select') {
|
||||
SelectionInit({ scope: $scope, list: list, url: url, returnToCaller: 1 });
|
||||
}
|
||||
@ -119,13 +117,15 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
||||
actionText: 'DELETE'
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$emit('choicesReadyCredential');
|
||||
}
|
||||
|
||||
CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||
'$stateParams', 'Rest', 'Alert', 'CredentialList', 'generateList', 'Prompt',
|
||||
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'GetChoices', 'Wait',
|
||||
'$state'
|
||||
'$state',
|
||||
];
|
||||
|
||||
|
||||
@ -317,13 +317,15 @@ CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
|
||||
|
||||
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
$stateParams, $timeout, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt,
|
||||
GetBasePath, GetChoices, KindChange, OrganizationList, LookUpInit, Empty,
|
||||
OwnerChange, FormSave, Wait, $state, CreateSelect2) {
|
||||
OwnerChange, FormSave, Wait, $state, CreateSelect2, Authorization) {
|
||||
if (!$rootScope.current_user) {
|
||||
Authorization.restoreUserInfo();
|
||||
}
|
||||
|
||||
ClearScope();
|
||||
|
||||
var defaultUrl = GetBasePath('credentials'),
|
||||
generator = GenerateForm,
|
||||
form = CredentialForm,
|
||||
@ -331,7 +333,6 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
master = {},
|
||||
id = $stateParams.credential_id,
|
||||
relatedSets = {};
|
||||
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
||||
generator.reset();
|
||||
$scope.id = id;
|
||||
@ -668,9 +669,9 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
}
|
||||
|
||||
CredentialsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'$log', '$stateParams', '$timeout', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'GetChoices',
|
||||
'KindChange', 'OrganizationList', 'LookUpInit', 'Empty', 'OwnerChange',
|
||||
'FormSave', 'Wait', '$state', 'CreateSelect2'
|
||||
'FormSave', 'Wait', '$state', 'CreateSelect2', 'Authorization'
|
||||
];
|
||||
|
||||
@ -39,7 +39,7 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
scope.project_required = false;
|
||||
scope.subscription_required = false;
|
||||
scope.key_description = "Paste the contents of the SSH private key file.<div class=\"popover-footer\"><span class=\"key\">esc</span> or click to close</div>";
|
||||
scope.key_hint= "drag and drop an SSH private key file on the field below";
|
||||
scope.key_hint= "paste or drag and drop an SSH private key file on the field below";
|
||||
scope.host_required = false;
|
||||
scope.password_required = false;
|
||||
scope.hostLabel = '';
|
||||
@ -65,7 +65,7 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
scope.domain_required = false;
|
||||
scope.subscription_required = false;
|
||||
scope.key_description = "Paste the contents of the SSH private key file.";
|
||||
scope.key_hint= "drag and drop an SSH private key file on the field below";
|
||||
scope.key_hint= "paste or drag and drop an SSH private key file on the field below";
|
||||
scope.host_required = false;
|
||||
scope.password_required = false;
|
||||
scope.hostLabel = '';
|
||||
@ -222,8 +222,8 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
}
|
||||
])
|
||||
|
||||
.factory('FormSave', ['$rootScope', 'Refresh', '$location', 'Alert', 'Rest', 'ProcessErrors', 'Empty', 'GetBasePath', 'CredentialForm', 'ReturnToCaller', 'Wait',
|
||||
function ($rootScope, Refresh, $location, Alert, Rest, ProcessErrors, Empty, GetBasePath, CredentialForm, ReturnToCaller, Wait) {
|
||||
.factory('FormSave', ['$rootScope', 'Refresh', '$location', 'Alert', 'Rest', 'ProcessErrors', 'Empty', 'GetBasePath', 'CredentialForm', 'ReturnToCaller', 'Wait', '$state',
|
||||
function ($rootScope, Refresh, $location, Alert, Rest, ProcessErrors, Empty, GetBasePath, CredentialForm, ReturnToCaller, Wait, $state) {
|
||||
return function (params) {
|
||||
var scope = params.scope,
|
||||
mode = params.mode,
|
||||
@ -293,6 +293,8 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
else {
|
||||
ReturnToCaller(1);
|
||||
}
|
||||
$state.go('credentials.edit', {credential_id: data.id}, {reload: true});
|
||||
|
||||
})
|
||||
.error(function (data, status) {
|
||||
Wait('stop');
|
||||
@ -314,6 +316,7 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
else {
|
||||
ReturnToCaller(1);
|
||||
}
|
||||
|
||||
})
|
||||
.error(function (data, status) {
|
||||
Wait('stop');
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="TagSearch row">
|
||||
<div ng-class="listConfig.searchSize || 'col-lg-4 col-md-8 col-sm-12 col-xs-12'">
|
||||
<div ng-class="listConfig.searchSize || 'col-lg-4 col-md-12 col-sm-12 col-xs-12'">
|
||||
<div class="TagSearch-bar">
|
||||
<div class="TagSearch-typeDropdown"
|
||||
ng-click="toggleTypeDropdown()"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user