From 940ce3b38d47df4c7ff4d58d357de3c57461b37c Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Wed, 29 Mar 2017 14:21:59 +0200 Subject: [PATCH] Feature #4913: Attach disk (PR #233) * Attach disk | SWAP removed for vCenter templates * Attach disk | qcow2 removed for vCenter templates * Attach disk | SWAP & cowq2 removed for vCenter vms * VM attach disk | Changed 'Advanced options' for vCenter disks * Restyled import image * Update html.hbs Add missing ; --- .../images-tab/form-panels/import/html.hbs | 16 +++++----- .../wizard-tabs/storage/disk-tab/html.hbs | 10 +++++-- .../wizard-tabs/storage/disk-tab/options.hbs | 30 +++++++++++++++++-- .../public/app/tabs/vms-tab/panels/storage.js | 7 +++-- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/import/html.hbs b/src/sunstone/public/app/tabs/images-tab/form-panels/import/html.hbs index ab8ee9d356..b843babfce 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/import/html.hbs +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/import/html.hbs @@ -31,19 +31,21 @@ -
+
-
- - +
+
+
+ +
{{{vCenterImagesHTML}}}
-
\ No newline at end of file +
diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs index 479a92e087..8edbec819d 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs @@ -74,19 +74,25 @@ - +
- +

diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/options.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/options.hbs index db9f134fee..f4ea7f4fc0 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/options.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/options.hbs @@ -1,5 +1,5 @@
-
+
-
+
-
+
@@ -45,6 +45,30 @@
+
+ + +
+
+ + +
diff --git a/src/sunstone/public/app/tabs/vms-tab/panels/storage.js b/src/sunstone/public/app/tabs/vms-tab/panels/storage.js index 1eb072c0a9..eee04502bd 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/storage.js +++ b/src/sunstone/public/app/tabs/vms-tab/panels/storage.js @@ -436,6 +436,10 @@ define(function(require) { context.on('click', '#attach_disk', function() { var dialog = Sunstone.getDialog(ATTACH_DISK_DIALOG_ID); dialog.setElement(that.element); + if(that.element.USER_TEMPLATE.HYPERVISOR && that.element.USER_TEMPLATE.HYPERVISOR == 'venter'){ + $('.hypervisor.only_kvm').hide(); + $('.hypervisor.only_vcenter').show(); + } dialog.show(); return false; }); @@ -445,7 +449,6 @@ define(function(require) { context.off('click', '.detachdisk'); context.on('click', '.detachdisk', function() { var disk_id = $(this).parents('tr').attr('disk_id'); - Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : headerTabId: TAB_ID, @@ -596,7 +599,7 @@ define(function(require) { return false; }); } - + Tree.setup(context); }