Revision 96ede451
Added by Amos Benari about 12 years ago
- ID 96ede451fc45d6d8e5786d62d4c92adc97c46ad3
public/javascripts/compute_resource.js | ||
---|---|---|
$('[id$=_memory]').val(result.memory);
|
||
$('[id$=_cores]').val(result.cores);
|
||
$('#network_interfaces').children('.fields').remove();
|
||
$.each(result.interfaces, function() {add_network_interface(this);})
|
||
$.each(result.interfaces, function() {add_network_interface(this);});
|
||
$('#volumes').children('.fields').remove();
|
||
$.each(result.volumes, function() {add_volume(this);});
|
||
},
|
||
complete: function(result){
|
||
$('#hwp_indicator').hide();
|
||
... | ... | |
}
|
||
// fill in the template interfaces.
|
||
function add_network_interface(item){
|
||
var new_id = add_child_node($(".add_nested_fields"));
|
||
var new_id = add_child_node($("#network_interfaces .add_nested_fields"));
|
||
$('[id$='+new_id+'_name]').val(item.name);
|
||
$('[id$='+new_id+'_network]').val(item.network);
|
||
}
|
||
|
||
// fill in the template volumes.
|
||
function add_volume(item){
|
||
var new_id = add_child_node($("#volumes .add_nested_fields"));
|
||
$('[id$='+new_id+'_size_gb]').val(item.size_gb).attr('disabled', 'disabled');
|
||
$('[id$='+new_id+'_storage_domain]').val(item.storage_domain).attr('disabled', 'disabled');
|
||
$('[id$='+new_id+'_bootable]').attr('checked', item.bootable).attr('disabled', 'disabled');
|
||
$('[id$='+new_id+'_storage_domain]').next().hide();
|
||
}
|
||
|
||
function ovirt_clusterSelected(item){
|
||
var cluster = $(item).val();
|
||
var url = $(item).attr('data-url');
|
Also available in: Unified diff
fixes #1574 - ovirt - add remove and show volumes