mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
Merge pull request #2247 from jlmitch5/fixAddOrgAndNewListSearch
Fix add org and new list search
This commit is contained in:
@@ -26,8 +26,9 @@ export default ['$scope', '$rootScope', '$location', '$stateParams',
|
|||||||
function init(){
|
function init(){
|
||||||
// @issue What is this doing, why
|
// @issue What is this doing, why
|
||||||
$scope.$emit("HideOrgListHeader");
|
$scope.$emit("HideOrgListHeader");
|
||||||
$scope.custom_virtualenvs_visible = ConfigData.custom_virtualenvs.length > 1;
|
const virtualEnvs = ConfigData.custom_virtualenvs || [];
|
||||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs.filter(
|
$scope.custom_virtualenvs_visible = virtualEnvs.length > 1;
|
||||||
|
$scope.custom_virtualenvs_options = virtualEnvs.filter(
|
||||||
v => !/\/ansible\/$/.test(v)
|
v => !/\/ansible\/$/.test(v)
|
||||||
);
|
);
|
||||||
CreateSelect2({
|
CreateSelect2({
|
||||||
|
|||||||
@@ -34,8 +34,9 @@ export default ['$scope', '$location', '$stateParams', 'OrgAdminLookup',
|
|||||||
|
|
||||||
$scope.$emit("HideOrgListHeader");
|
$scope.$emit("HideOrgListHeader");
|
||||||
$scope.instance_groups = InstanceGroupsData;
|
$scope.instance_groups = InstanceGroupsData;
|
||||||
$scope.custom_virtualenvs_visible = ConfigData.custom_virtualenvs.length > 1;
|
const virtualEnvs = ConfigData.custom_virtualenvs || [];
|
||||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs.filter(
|
$scope.custom_virtualenvs_visible = virtualEnvs.length > 1;
|
||||||
|
$scope.custom_virtualenvs_options = virtualEnvs.filter(
|
||||||
v => !/\/ansible\/$/.test(v)
|
v => !/\/ansible\/$/.test(v)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ export default ['$scope', '$location', '$stateParams', 'GenerateForm',
|
|||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
$scope.canEditOrg = true;
|
$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.setUrl(GetBasePath('projects'));
|
||||||
Rest.options()
|
Rest.options()
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ export default ['$scope', '$rootScope', '$stateParams', 'ProjectsForm', 'Rest',
|
|||||||
function init() {
|
function init() {
|
||||||
$scope.project_local_paths = [];
|
$scope.project_local_paths = [];
|
||||||
$scope.base_dir = '';
|
$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) {
|
$scope.$watch('project_obj.summary_fields.user_capabilities.edit', function(val) {
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ function SmartSearchController (
|
|||||||
}
|
}
|
||||||
$scope.dataset = res.data;
|
$scope.dataset = res.data;
|
||||||
$scope.collection = res.data.results;
|
$scope.collection = res.data.results;
|
||||||
|
$scope.$emit('updateDataset', res.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.searchTerm = null;
|
$scope.searchTerm = null;
|
||||||
@@ -200,6 +201,7 @@ function SmartSearchController (
|
|||||||
}
|
}
|
||||||
$scope.dataset = data;
|
$scope.dataset = data;
|
||||||
$scope.collection = data.results;
|
$scope.collection = data.results;
|
||||||
|
$scope.$emit('updateDataset', data);
|
||||||
})
|
})
|
||||||
.catch(() => revertSearch(unmodifiedQueryset));
|
.catch(() => revertSearch(unmodifiedQueryset));
|
||||||
|
|
||||||
@@ -234,6 +236,7 @@ function SmartSearchController (
|
|||||||
}
|
}
|
||||||
$scope.dataset = data;
|
$scope.dataset = data;
|
||||||
$scope.collection = data.results;
|
$scope.collection = data.results;
|
||||||
|
$scope.$emit('updateDataset', data);
|
||||||
});
|
});
|
||||||
|
|
||||||
generateSearchTags();
|
generateSearchTags();
|
||||||
@@ -263,6 +266,7 @@ function SmartSearchController (
|
|||||||
}
|
}
|
||||||
$scope.dataset = data;
|
$scope.dataset = data;
|
||||||
$scope.collection = data.results;
|
$scope.collection = data.results;
|
||||||
|
$scope.$emit('updateDataset', data);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.searchTags = qs.stripDefaultParams(queryset, defaults);
|
$scope.searchTags = qs.stripDefaultParams(queryset, defaults);
|
||||||
|
|||||||
@@ -89,7 +89,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$scope.job_type = $scope.job_type_options[form.fields.job_type.default];
|
$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({
|
CreateSelect2({
|
||||||
element:'#job_template_job_type',
|
element:'#job_template_job_type',
|
||||||
|
|||||||
@@ -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.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.job_tag_options = [];
|
||||||
$scope.skip_tag_options = [];
|
$scope.skip_tag_options = [];
|
||||||
$scope.custom_virtualenvs_options = ConfigData.custom_virtualenvs;
|
const virtualEnvs = ConfigData.custom_virtualenvs || [];
|
||||||
|
$scope.custom_virtualenvs_options = virtualEnvs;
|
||||||
|
|
||||||
SurveyControllerInit({
|
SurveyControllerInit({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
|
|||||||
Reference in New Issue
Block a user