fix merge issue with inventory source service

This commit is contained in:
Jake McDermott
2017-12-13 13:23:15 -05:00
parent 9f8ef4d1e5
commit 3b791609cd

View File

@@ -121,6 +121,7 @@ export default
if(source === 'ec2'){ if(source === 'ec2'){
return _.map(group_by, 'value').join(','); return _.map(group_by, 'value').join(',');
} }
if(source === 'vmware'){ if(source === 'vmware'){
group_by = _.map(group_by, (i) => {return i.value;}); group_by = _.map(group_by, (i) => {return i.value;});
$("#inventory_source_group_by").siblings(".select2").first().find(".select2-selection__choice").each(function(optionIndex, option){ $("#inventory_source_group_by").siblings(".select2").first().find(".select2-selection__choice").each(function(optionIndex, option){
@@ -149,17 +150,5 @@ export default
.error(this.error.bind(this)) .error(this.error.bind(this))
.finally(); .finally();
} }
if(source === 'vmware'){
group_by = _.map(group_by, (i) => {return i.value;});
$("#inventory_source_group_by").siblings(".select2").first().find(".select2-selection__choice").each(function(optionIndex, option){
group_by.push(option.title);
});
group_by = (Array.isArray(group_by)) ? _.uniq(group_by).join() : "";
return group_by;
}
else {
return;
}
}
}; };
}]; }];