From f90a3ce9e3452ded16b8333d0d950554680ca5d8 Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Fri, 24 Mar 2017 18:00:42 +0100 Subject: [PATCH] F #4913 vCenter Sunstone for new Storage Management (PR #232) * vCenter image * Enabled System in create Datastore when vCenter is selecting --- .../tabs/datastores-tab/form-panels/create.js | 1 - .../images-tab/form-panels/create-common.js | 24 +++++++++---------- .../images-tab/form-panels/create/wizard.hbs | 12 +++++----- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js b/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js index 3789933341..e67093a2d3 100644 --- a/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js +++ b/src/sunstone/public/app/tabs/datastores-tab/form-panels/create.js @@ -183,7 +183,6 @@ define(function(require) { break; case "vcenter": - $('input#system_ds_type', dialog).attr('disabled', 'disabled'); $('input#file_ds_type', dialog).attr('disabled', 'disabled'); _selectvCenter(dialog); break; diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js b/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js index c740d3c545..bcad8f2389 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js @@ -205,8 +205,8 @@ define(function(require) { }); // Custom Adapter Type - var custom_attrs = ["adapter_type", - "disk_type", + var custom_attrs = ["vcenter_adapter_type", + "vcenter_disk_type", "img_dev_prefix", "img_driver"]; @@ -414,12 +414,12 @@ define(function(require) { if (target) img_json["TARGET"] = target; - var adapter_type = WizardFields.retrieveInput($('#adapter_type', context)); - if (adapter_type) { - if (adapter_type == "custom") { - adapter_type = WizardFields.retrieveInput($('#custom_adapter_type', context)); + var vcenter_adapter_type = WizardFields.retrieveInput($('#vcenter_adapter_type', context)); + if (vcenter_adapter_type) { + if (vcenter_adapter_type == "custom") { + vcenter_adapter_type = WizardFields.retrieveInput($('#custom_vcenter_adapter_type', context)); } - img_json["VCENTER_ADAPTER_TYPE"] = adapter_type; + img_json["VCENTER_ADAPTER_TYPE"] = vcenter_adapter_type; } switch ($('#src_path_select input:checked', context).val()){ @@ -431,12 +431,12 @@ define(function(require) { size = WizardFields.retrieveInput($('#img_size', context)); if (size) img_json["SIZE"] = size; - var disk_type = WizardFields.retrieveInput($('#disk_type', context)); - if (disk_type) { - if (disk_type == "custom"){ - disk_type = WizardFields.retrieveInput($('#custom_disk_type', context)); + var vcenter_disk_type = WizardFields.retrieveInput($('#vcenter_disk_type', context)); + if (vcenter_disk_type) { + if (vcenter_disk_type == "custom"){ + vcenter_disk_type = WizardFields.retrieveInput($('#custom_disk_type', context)); } - img_json["DISK_TYPE"] = disk_type; + img_json["VCENTER_DISK_TYPE"] = vcenter_disk_type; } break; diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs b/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs index 37db4780e8..5efe5c43ea 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs @@ -104,10 +104,10 @@
-
@@ -126,10 +126,10 @@
-