mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
fix of select2 reversion I made
This commit is contained in:
parent
eebbde78ce
commit
192e8cbab8
@ -237,8 +237,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
* TODO: Document
|
||||
*
|
||||
*/
|
||||
.factory('SourceChange', ['GetBasePath', 'CredentialList', 'LookUpInit', 'Empty', 'Wait', 'ParseTypeChange', 'CustomInventoryList' ,
|
||||
function (GetBasePath, CredentialList, LookUpInit, Empty, Wait, ParseTypeChange, CustomInventoryList) {
|
||||
.factory('SourceChange', ['GetBasePath', 'CredentialList', 'LookUpInit', 'Empty', 'Wait', 'ParseTypeChange', 'CustomInventoryList', 'CreateSelect2',
|
||||
function (GetBasePath, CredentialList, LookUpInit, Empty, Wait, ParseTypeChange, CustomInventoryList, CreateSelect2) {
|
||||
return function (params) {
|
||||
|
||||
var scope = params.scope,
|
||||
@ -256,37 +256,32 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
}
|
||||
if (scope.source.value === 'rax') {
|
||||
scope.source_region_choices = scope.rax_regions;
|
||||
//$('#s2id_group_source_regions').select2('data', []);
|
||||
$('#s2id_source_source_regions').select2('data', [{
|
||||
id: 'all',
|
||||
text: 'All'
|
||||
}]);
|
||||
$('#source_form').addClass('squeeze');
|
||||
CreateSelect2({
|
||||
element: '#source_source_regions'
|
||||
});
|
||||
} else if (scope.source.value === 'ec2') {
|
||||
scope.source_region_choices = scope.ec2_regions;
|
||||
$('#s2id_source_source_regions').select2('data', [{
|
||||
id: 'all',
|
||||
text: 'All'
|
||||
}]);
|
||||
scope.group_by_choices = scope.ec2_group_by;
|
||||
$('#s2id_group_by').select2('data', []);
|
||||
$('#source_form').addClass('squeeze');
|
||||
scope.group_by_choices = scope.ec2_group_by;
|
||||
$('#source_form').addClass('squeeze');
|
||||
CreateSelect2({
|
||||
element: '#source_source_regions'
|
||||
});
|
||||
CreateSelect2({
|
||||
element: '#source_group_by'
|
||||
});
|
||||
} else if (scope.source.value === 'gce') {
|
||||
scope.source_region_choices = scope.gce_regions;
|
||||
//$('#s2id_group_source_regions').select2('data', []);
|
||||
$('#s2id_source_source_regions').select2('data', [{
|
||||
id: 'all',
|
||||
text: 'All'
|
||||
}]);
|
||||
$('#source_form').addClass('squeeze');
|
||||
$('#source_form').addClass('squeeze');
|
||||
CreateSelect2({
|
||||
element: '#source_source_regions'
|
||||
});
|
||||
} else if (scope.source.value === 'azure') {
|
||||
scope.source_region_choices = scope.azure_regions;
|
||||
//$('#s2id_group_source_regions').select2('data', []);
|
||||
$('#s2id_source_source_regions').select2('data', [{
|
||||
id: 'all',
|
||||
text: 'All'
|
||||
}]);
|
||||
$('#source_form').addClass('squeeze');
|
||||
$('#source_form').addClass('squeeze');
|
||||
CreateSelect2({
|
||||
element: '#source_source_regions'
|
||||
});
|
||||
}
|
||||
if(scope.source.value==="custom"){
|
||||
// need to filter the possible custom scripts by the organization defined for the current inventory
|
||||
|
Loading…
Reference in New Issue
Block a user