1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

updating reference to custom virtualenv

This commit is contained in:
John Mitchell 2018-06-20 12:50:38 -04:00
parent d1bc9758db
commit 3d42fb1237
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94
6 changed files with 14 additions and 8 deletions

View File

@ -26,8 +26,9 @@ export default ['$scope', '$rootScope', '$location', '$stateParams',
function init(){
// @issue What is this doing, why
$scope.$emit("HideOrgListHeader");
$scope.custom_virtualenvs_visible = ConfigData.custom_virtualenvs.length > 1;
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs.filter(
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_visible = virtualEnvs.length > 1;
$scope.custom_virtualenvs_options = virtualEnvs.filter(
v => !/\/ansible\/$/.test(v)
);
CreateSelect2({

View File

@ -34,8 +34,9 @@ export default ['$scope', '$location', '$stateParams', 'OrgAdminLookup',
$scope.$emit("HideOrgListHeader");
$scope.instance_groups = InstanceGroupsData;
$scope.custom_virtualenvs_visible = ConfigData.custom_virtualenvs.length > 1;
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs.filter(
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_visible = virtualEnvs.length > 1;
$scope.custom_virtualenvs_options = virtualEnvs.filter(
v => !/\/ansible\/$/.test(v)
);
}

View File

@ -21,7 +21,8 @@ export default ['$scope', '$location', '$stateParams', 'GenerateForm',
function init() {
$scope.canEditOrg = true;
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_options = virtualEnvs;
Rest.setUrl(GetBasePath('projects'));
Rest.options()

View File

@ -25,7 +25,8 @@ export default ['$scope', '$rootScope', '$stateParams', 'ProjectsForm', 'Rest',
function init() {
$scope.project_local_paths = [];
$scope.base_dir = '';
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_options = virtualEnvs;
}
$scope.$watch('project_obj.summary_fields.user_capabilities.edit', function(val) {

View File

@ -89,7 +89,8 @@
}
}
$scope.job_type = $scope.job_type_options[form.fields.job_type.default];
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_options = virtualEnvs;
CreateSelect2({
element:'#job_template_job_type',

View File

@ -62,7 +62,8 @@ export default
$scope.surveyTooltip = i18n._('Surveys allow users to be prompted at job launch with a series of questions related to the job. This allows for variables to be defined that affect the playbook run at time of launch.');
$scope.job_tag_options = [];
$scope.skip_tag_options = [];
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_options = virtualEnvs;
SurveyControllerInit({
scope: $scope,