mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 20:05:03 -02:30
fix credential kind options for list
This commit is contained in:
@@ -46,13 +46,13 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
|||||||
Wait('stop');
|
Wait('stop');
|
||||||
$('#prompt-modal').modal('hide');
|
$('#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
|
// Translate the kind value
|
||||||
for (i = 0; i < $scope.credentials.length; i++) {
|
for (i = 0; i < $scope.credentials.length; i++) {
|
||||||
for (j = 0; j < $scope.credential_kind_options.length; j++) {
|
for (j = 0; j < $scope.credential_kind_options_list.length; j++) {
|
||||||
if ($scope.credential_kind_options[j].value === $scope.credentials[i].kind) {
|
if ($scope.credential_kind_options_list[j].value === $scope.credentials[i].kind) {
|
||||||
$scope.credentials[i].kind = $scope.credential_kind_options[j].label;
|
$scope.credentials[i].kind = $scope.credential_kind_options_list[j].label;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,6 +77,15 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
|||||||
$scope.search(list.iterator);
|
$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 () {
|
$scope.addCredential = function () {
|
||||||
$state.transitionTo('credentials.add');
|
$state.transitionTo('credentials.add');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user