mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-17 07:48:39 -05:00
allow the bundled ansible virtualenv to be selected on JT/Proj
see: https://github.com/ansible/awx/issues/34
This commit is contained in:
@@ -26,7 +26,10 @@ export default ['$scope', '$rootScope', '$location', '$stateParams',
|
||||
function init(){
|
||||
// @issue What is this doing, why
|
||||
$scope.$emit("HideOrgListHeader");
|
||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
|
||||
$scope.custom_virtualenvs_visible = ConfigData.custom_virtualenvs.length > 1;
|
||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs.filter(
|
||||
v => !/\/ansible\/$/.test(v)
|
||||
);
|
||||
CreateSelect2({
|
||||
element: '#organization_custom_virtualenv',
|
||||
multiple: false,
|
||||
|
||||
@@ -34,7 +34,10 @@ export default ['$scope', '$location', '$stateParams', 'OrgAdminLookup',
|
||||
|
||||
$scope.$emit("HideOrgListHeader");
|
||||
$scope.instance_groups = InstanceGroupsData;
|
||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
|
||||
$scope.custom_virtualenvs_visible = ConfigData.custom_virtualenvs.length > 1;
|
||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs.filter(
|
||||
v => !/\/ansible\/$/.test(v)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export default ['NotificationsList', 'i18n',
|
||||
},
|
||||
custom_virtualenv: {
|
||||
label: i18n._('Ansible Environment'),
|
||||
defaultText: i18n._('Default Environment'),
|
||||
defaultText: i18n._('Use Default Environment'),
|
||||
type: 'select',
|
||||
ngOptions: 'venv for venv in custom_virtualenvs_options track by venv',
|
||||
awPopOver: "<p>" + i18n._("Select the custom Python virtual environment for this organization to run on.") + "</p>",
|
||||
@@ -53,7 +53,7 @@ export default ['NotificationsList', 'i18n',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
ngShow: 'custom_virtualenvs_options.length > 0'
|
||||
ngShow: 'custom_virtualenvs_visible'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -206,14 +206,14 @@ export default ['i18n', 'NotificationsList', 'TemplateList',
|
||||
custom_virtualenv: {
|
||||
label: i18n._('Ansible Environment'),
|
||||
type: 'select',
|
||||
defaultText: i18n._('Default Environment'),
|
||||
defaultText: i18n._('Use Default Environment'),
|
||||
ngOptions: 'venv for venv in custom_virtualenvs_options track by venv',
|
||||
awPopOver: "<p>" + i18n._("Select the custom Python virtual environment for this project to run on.") + "</p>",
|
||||
dataTitle: i18n._('Ansible Environment'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
ngShow: 'custom_virtualenvs_options.length > 0'
|
||||
ngShow: 'custom_virtualenvs_options.length > 1'
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -234,14 +234,15 @@ function(NotificationsList, i18n) {
|
||||
custom_virtualenv: {
|
||||
label: i18n._('Ansible Environment'),
|
||||
type: 'select',
|
||||
defaultText: i18n._('Default Environment'),
|
||||
defaultText: i18n._('Use Default Environment'),
|
||||
ngOptions: 'venv for venv in custom_virtualenvs_options track by venv',
|
||||
|
||||
awPopOver: "<p>" + i18n._("Select the custom Python virtual environment for this job template to run on.") + "</p>",
|
||||
dataTitle: i18n._('Ansible Environment'),
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
ngShow: 'custom_virtualenvs_options.length > 0'
|
||||
ngShow: 'custom_virtualenvs_options.length > 1'
|
||||
},
|
||||
instance_groups: {
|
||||
label: i18n._('Instance Groups'),
|
||||
|
||||
Reference in New Issue
Block a user