'+tr("Volatile Disk")+'\
\
'+tr("Image")+'\
\
@@ -211,6 +211,26 @@ var create_template_tmpl = '
\
\
\
@@ -221,58 +241,6 @@ var create_template_tmpl = '
\
\
'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'
\
\
-
\
-
\
-
\
-
'+tr("Disk type")+'
\
-
\
-
\
-
\
-
\
-
'+tr("Disk file location path or URL")+'
\
-
\
-
\
-
\
-
\
-
'+tr("shared,ssh,iscsi,dummy")+'
\
-
\
-
\
- \
-
\
-
\
-
'+tr("Size in MB")+'
\
-
\
-
\
- \
-
\
-
\
-
'+tr("Filesystem type for the fs images")+'
\
-
\
-
\
-
\
-
\
-
'+tr("Clone this image")+'
\
-
\
-
\
-
\
-
\
-
'+tr("Save this image after shutting down the VM")+'
\
-
\
-
\
-
\
-
\
-
'+tr("Mount image as read-only")+'
\
-
\
\
\
\
@@ -1033,7 +1001,6 @@ function setupCreateTemplateDialog(){
//empty selects
$('select#BOOT',section_os_boot).empty();
- $('select#TYPE',section_disks).empty();
//hide options about boot method
$('div#kernel_bootloader',section_os_boot).show();
@@ -1093,23 +1060,11 @@ function setupCreateTemplateDialog(){
$('.kvm .man_icon',dialog).css("display","inline-block");
//KVM particularities:
- // * Add custom disk types
// * Add custom boot options
// * Show boot options
// * Set the raw type to kvm
// * Show the inputs and graphics section
- var type_opts =
- '\
- \
- \
- \
- \
- \
- ';
-
- $('select#TYPE',section_disks).html(type_opts);
-
var boot_opts =
'\
\
@@ -1133,21 +1088,10 @@ function setupCreateTemplateDialog(){
$('.xen .man_icon',dialog).css("display","inline-block");
// XEN particularities:
- // * Add custom disk types
// * Remove driver default boot method
// * Set the raw section to XEN
// * Show the graphics section
- var type_opts =
- '\
- \
- \
- \
- \
- ';
-
- $('select#TYPE',section_disks).html(type_opts);
-
$('select#boot_method option#no_boot',section_os_boot).html(tr("Please choose"));
$('input#TYPE', section_raw).val("xen");
@@ -1161,17 +1105,9 @@ function setupCreateTemplateDialog(){
$('.vmware .man_icon',dialog).css("display","inline-block");
//VMWARE particularities
- // * Add custom disk types
// * Hide boot method field
// * Set the raw type to vmware
- var type_opts =
- '\
- \
- ';
-
- $('select#TYPE',section_disks).html(type_opts);
-
$('div#kernel_bootloader',section_os_boot).hide();
$('input#TYPE', section_raw).val("vmware");
@@ -1434,6 +1370,8 @@ function setupCreateTemplateDialog(){
$('.add_image',section_disks).attr('disabled','disabled');
$('.add_disk',section_disks).show();
$('.add_disk',section_disks).removeAttr('disabled');
+ // Trigger since disk type is preselected
+ $('select#TYPE', section_disks).trigger('change');
break;
case "image":
$('.add_disk',section_disks).hide();
@@ -1442,11 +1380,6 @@ function setupCreateTemplateDialog(){
$('.add_image',section_disks).removeAttr('disabled');
break;
}
- $('#SIZE',section_disks).parent().hide();
- $('#SIZE',section_disks).parent().attr('disabled','disabled');
- $('#FORMAT',section_disks).parent().hide();
- $('#SIZE',section_disks).parent().attr('disabled','disabled');
- $('#TYPE :selected',section_disks).removeAttr('selected');
//hide_disabled(section_disks);
});
@@ -1460,32 +1393,15 @@ function setupCreateTemplateDialog(){
//size mandatory
$('#SIZE',section_disks).parent().show();
$('#SIZE',section_disks).parent().removeAttr('disabled');
- $('#SIZE',section_disks).parent().removeClass(opt_class);
- $('#SIZE',section_disks).parent().addClass(man_class);
-
- //target optional
- $('#TARGET',section_disks).parent().removeClass(man_class);
- $('#TARGET',section_disks).parent().addClass(opt_class);
//format hidden
$('#FORMAT',section_disks).parent().hide();
$('#FORMAT',section_disks).parent().attr('disabled','disabled');
-
- //source hidden
- $('#SOURCE',section_disks).parent().hide();
- $('#SOURCE',section_disks).parent().
- attr('disabled','disabled');
break;
case "fs":
//size mandatory
$('#SIZE',section_disks).parent().show();
$('#SIZE',section_disks).parent().removeAttr('disabled');
- $('#SIZE',section_disks).parent().removeClass(opt_class);
- $('#SIZE',section_disks).parent().addClass(man_class);
-
- //target mandatory
- $('#TARGET',section_disks).parent().removeClass(opt_class);
- $('#TARGET',section_disks).parent().addClass(man_class);
//format mandatory
$('#FORMAT',section_disks).parent().show();
@@ -1493,12 +1409,10 @@ function setupCreateTemplateDialog(){
$('#FORMAT',section_disks).parent().removeClass(opt_class);
$('#FORMAT',section_disks).parent().addClass(man_class);
- //source hidden
- $('#SOURCE',section_disks).parent().hide();
- $('#SOURCE',section_disks).parent().
- attr('disabled','disabled');
- break;
- case "block":
+ break;
+/* As of 3.8 the following dont exist */
+/*
+ case "block":
//size shown and optional
$('#SIZE',section_disks).parent().show();
$('#SIZE',section_disks).parent().removeAttr('disabled');
@@ -1538,6 +1452,7 @@ function setupCreateTemplateDialog(){
$('#SOURCE',section_disks).parent().show();
$('#SOURCE',section_disks).parent().
removeAttr('disabled');
+*/
}
//hide_disabled(section_disks);
});
@@ -1556,10 +1471,6 @@ function setupCreateTemplateDialog(){
box_remove_element(section_disks,'#disks_box');
return false;
});
-
- //preselect now hidden option
- $('#image_vs_disk input#add_image',section_disks).trigger('click');
-
};
// Set up the swap section