Revision 3d03e334
Added by Dominic Cleal about 10 years ago
app/assets/javascripts/compute_resource.js | ||
---|---|---|
item.show();
|
||
}
|
||
|
||
function libvirt_image_selected(item){
|
||
var template = $(item).val();
|
||
if (template) {
|
||
var url = $(item).attr('data-url');
|
||
$(item).indicator_show();
|
||
$.ajax({
|
||
type:'post',
|
||
url: url,
|
||
data:'template_id=' + template,
|
||
success: function(result){
|
||
capacity = $('#storage_volumes').children('.fields').find('[id$=capacity]')[0];
|
||
if (parseInt(capacity.value.slice(0, -1), 10) < parseInt(result.capacity, 10))
|
||
capacity.value = result.capacity + 'G';
|
||
$('#storage_volumes').children('.fields').find('[id$=format_type]')[0].value = 'qcow2';
|
||
},
|
||
complete: function(){
|
||
$(item).indicator_hide();
|
||
$('[rel="twipsy"]').tooltip();
|
||
}
|
||
})
|
||
}
|
||
}
|
||
|
||
function ec2_vpcSelected(form){
|
||
sg_select = $('.security_group_ids')
|
||
sg_select.empty();
|
Also available in: Unified diff
fixes #4123 - libvirt imaging support using backing volumes