mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
AC-628 applied credential changes made in add controller to edit controller so that credential/cloud_credential lookups display context-aware credential lists.
This commit is contained in:
@@ -494,6 +494,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
|
|||||||
});
|
});
|
||||||
|
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
|
url: GetBasePath('credentials') + '?kind=ssh',
|
||||||
scope: scope,
|
scope: scope,
|
||||||
form: form,
|
form: form,
|
||||||
current_item: data.credential,
|
current_item: data.credential,
|
||||||
@@ -501,11 +502,19 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
|
|||||||
field: 'credential'
|
field: 'credential'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Clone the CredentialList object for use with cloud_credential. Cloning
|
||||||
|
// and changing properties to avoid collision.
|
||||||
|
var CloudCredentialList = {};
|
||||||
|
jQuery.extend(true, CloudCredentialList, CredentialList);
|
||||||
|
CloudCredentialList.name = 'cloudcredentials',
|
||||||
|
CloudCredentialList.iterator = 'cloudcredential',
|
||||||
|
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
|
url: GetBasePath('credentials') + '?cloud=true',
|
||||||
scope: scope,
|
scope: scope,
|
||||||
form: form,
|
form: form,
|
||||||
current_item: data.cloud_credential,
|
current_item: data.cloud_credential,
|
||||||
list: CredentialList,
|
list: CloudCredentialList,
|
||||||
field: 'cloud_credential'
|
field: 'cloud_credential'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user