mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
conditionally require cloud credential
This commit is contained in:
@@ -46,8 +46,10 @@ export default
|
|||||||
sourceModel: 'credential',
|
sourceModel: 'credential',
|
||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
ngClick: 'lookUpCredential()',
|
ngClick: 'lookUpCredential()',
|
||||||
addRequired: false,
|
awRequiredWhen: {
|
||||||
editRequired: false
|
variable: "cloudCredentialRequired",
|
||||||
|
init: "false"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
source_regions: {
|
source_regions: {
|
||||||
label: 'Regions',
|
label: 'Regions',
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
scope.cloudCredentialRequired = false;
|
||||||
scope.$emit('sourceTypeOptionsReady');
|
scope.$emit('sourceTypeOptionsReady');
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
@@ -243,6 +244,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
form = params.form,
|
form = params.form,
|
||||||
kind, url, callback, invUrl;
|
kind, url, callback, invUrl;
|
||||||
|
|
||||||
|
scope.cloudCredentialRequired = false;
|
||||||
|
|
||||||
if (!Empty(scope.source)) {
|
if (!Empty(scope.source)) {
|
||||||
if (scope.source.value === 'file') {
|
if (scope.source.value === 'file') {
|
||||||
scope.sourcePathRequired = true;
|
scope.sourcePathRequired = true;
|
||||||
@@ -313,6 +316,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
kind = 'aws';
|
kind = 'aws';
|
||||||
} else {
|
} else {
|
||||||
kind = scope.source.value;
|
kind = scope.source.value;
|
||||||
|
scope.cloudCredentialRequired = true;
|
||||||
}
|
}
|
||||||
url = GetBasePath('credentials') + '?cloud=true&kind=' + kind;
|
url = GetBasePath('credentials') + '?cloud=true&kind=' + kind;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
|
|||||||
Reference in New Issue
Block a user