\
\
@@ -1064,7 +1084,9 @@ function updateVMInfo(request,vm){
$('tr.at_image',$hotplugging_tab).show();
}
-//Generates the HTML for the hotplugging tab
+// Generates the HTML for the hotplugging tab
+// This is a list of disks with the save_as, detach options.
+// And a form to attach a new disk to the VM, if it is running.
function printDisks(vm_info){
var im_sel = makeSelectOptions(dataTable_images,
1, //id col - trick -> reference by name!
@@ -1102,20 +1124,25 @@ function printDisks(vm_info){
html += disk.DISK_ID + ' - ' +
(disk.IMAGE ? disk.IMAGE : "Volatile") + '';
html += '\
+'+(vm_info.STATE == "3" ? '\
\
+' : '')+'\
\
- \
+ '
++'\
| ';
}
html += '\
';
+ // If VM is not RUNNING, then we forget about the attach disk form.
if (vm_info.STATE != "3"){
html +='';
return html;
}
+ // Attach disk form
html += '