mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
fix credential kind options for list
This commit is contained in:
parent
e5a1ee8b94
commit
5467b233eb
@ -46,13 +46,13 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
||||
Wait('stop');
|
||||
$('#prompt-modal').modal('hide');
|
||||
|
||||
list.fields.kind.searchOptions = $scope.credential_kind_options;
|
||||
list.fields.kind.searchOptions = $scope.credential_kind_options_list;
|
||||
|
||||
// Translate the kind value
|
||||
for (i = 0; i < $scope.credentials.length; i++) {
|
||||
for (j = 0; j < $scope.credential_kind_options.length; j++) {
|
||||
if ($scope.credential_kind_options[j].value === $scope.credentials[i].kind) {
|
||||
$scope.credentials[i].kind = $scope.credential_kind_options[j].label;
|
||||
for (j = 0; j < $scope.credential_kind_options_list.length; j++) {
|
||||
if ($scope.credential_kind_options_list[j].value === $scope.credentials[i].kind) {
|
||||
$scope.credentials[i].kind = $scope.credential_kind_options_list[j].label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -77,6 +77,15 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
||||
$scope.search(list.iterator);
|
||||
});
|
||||
|
||||
// Load the list of options for Kind
|
||||
GetChoices({
|
||||
scope: $scope,
|
||||
url: defaultUrl,
|
||||
field: 'kind',
|
||||
variable: 'credential_kind_options_list',
|
||||
callback: 'choicesReadyCredential'
|
||||
});
|
||||
|
||||
$scope.addCredential = function () {
|
||||
$state.transitionTo('credentials.add');
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user