From a5460f4381677a8971f970e832468649212835fb Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 4 Mar 2014 19:14:21 +0100 Subject: [PATCH] Update images tab --- src/sunstone/public/js/plugins/images-tab.js | 314 ++++++++----------- 1 file changed, 131 insertions(+), 183 deletions(-) diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index adcae0a619..e3d1e35a4a 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -18,141 +18,112 @@ size_images = 0; -var create_image_tmpl = - '
\ -

'+tr("Create Image")+'

\ +var create_image_tmpl ='
\ +
\ +

'+tr("Create Image")+'

'+ + '
'+ + '\
\
\
\ -
\ -
'+tr("Wizard")+'
\ -
'+tr("Advanced mode")+'
\ -
\ -
\ +
\
\
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
'+tr("Name that the Image will get. Every image must have a unique name.")+'
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
\ -
'+tr("Human readable description of the image for other users.")+'
\ -
\
\
\
\
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
'+tr("Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).")+'
\ +
\ + \ + \
\
\
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
'+tr("Select the datastore for this image")+'
\ +
\ + \ + \
\
\
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
'+tr("Persistence of the image")+'
\ +
\ + \ + \
\
\
\
\ -
\
\ - '+tr("Image location")+':\ -
\ - '+ tr("Provide a path")+'  \ - '+tr("Upload")+'  \ - '+tr("Empty datablock")+'  \ -
\ -
\ -
\ -
\ -
\ - \ + '+tr("Image location")+':\ +
\ +
\ + \ + \ + \ +
\ +
\ +
\ +
\ +
\ + \ + \ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + \ +
\
\ -
\ - \ -
\ -
\ -
'+tr("Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.")+'
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
'+tr("Size of the datablock in MB.")+'
\ -
\ -
\ -
\ -
\ -
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
'+tr("Type of file system to be built.")+'

' - + tr(" Plain. When the disk image is used directly by the hypervisor we can format the image, and so it is ready to be used by the guest OS. Values: ext2, ext3, ext4, ntfs, reiserfs, jfs, swap. Any other fs supported by mkfs will work if no special option is needed. .")+'

' - + tr(" Formatted. The disk image is stored in a hypervisor specific format VMDK or Qcow2. Then we cannot really make a filesystem on the image, just create the device and let the guest OS format the disk. Use raw to not to format the new image. Values: raw, qcow2, vmdk_*.")+'
\ -
\ -
\ -
\ -
\ -
\ -
\ + \
\

'+tr("Advanced options")+'

\
\ @@ -160,39 +131,30 @@ var create_image_tmpl =
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
\ -
'+tr("Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).")+'
\ -
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
\ -
'+tr("Specific image mapping driver. KVM: raw, qcow2. XEN: tap:aio, file:")+'
\ -
\
\
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
\ -
'+tr("Target on which the image will be mounted at. For example: hda, sdb...")+'
\ -
\
\
\
\ @@ -202,32 +164,22 @@ var create_image_tmpl =
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
\ -
\
\
\ -
\ - \ -
\ -
\ +
\ + \ \
\ -
\ -
\
\
\ -
\ - \ -
\ -
\ \ @@ -237,7 +189,7 @@ var create_image_tmpl =
\
\
\ - \ \ \
\ @@ -246,9 +198,8 @@ var create_image_tmpl =
\ \
\ -
\ +
\ \
\ -
\ -
\ - \ -
\ -
\ +
\ +
\ +
\ + \ \
\ - \ -
\ +
\ +
\ +
\ + \ +
\ +
\ +
\ \
\ -
\ ×\ - \ + \
'; var dataTable_images; @@ -906,7 +859,7 @@ function setupCreateImageDialog(dialog){ var dialog = $create_image_dialog; dialog.html(create_image_tmpl); - dialog.addClass("reveal-modal large max-height").attr("data-reveal", ""); + dialog.addClass("reveal-modal medium max-height").attr("data-reveal", ""); initialize_create_image_dialog(dialog); } @@ -929,7 +882,7 @@ function initialize_create_image_dialog(dialog) { break; default: $('#datablock_img',context).attr('disabled','disabled'); - $('#path_img',context).click(); + $('#path_image',context).click(); } }); @@ -956,7 +909,7 @@ function initialize_create_image_dialog(dialog) { }); - $('#path_img',dialog).click(); + $('#path_image',dialog).click(); $('#add_custom_var_image_button', dialog).click( @@ -1264,33 +1217,28 @@ function setupImageCloneDialog(){ //Put HTML in place - var html = '
\ -

\ - '+tr("Clone Image")+'\ -

\ -
\ -
\ -
\ -
\ -
'+tr("Several image are selected, please choose prefix to name the new copies")+':
\ -
\ + var html = '
\ +

'+tr("Clone Image")+'

\
\ -
\ -
\ - \ - \ +\ +
\ +
\ +
\ +
'+tr("Several image are selected, please choose prefix to name the new copies")+':
\ +
\ +
\
\ -
\ - \ +
\ +
\ + \ + \ + \ +
\
\ -
\ -
\ -
\ - \ -
\ -×\ +
\ + \ +
\ + ×\ \ ';