From c7593720393ea5517aee89e4f74e59b057ead2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 11 Oct 2016 12:00:51 +0200 Subject: [PATCH] Revert "Bug #4566: vcenter adapter and disk type inputs in DS wizard" This reverts commit 6a6caeb04b9dcab3f48c04da09702114e9cf724e. --- .../tabs/datastores-tab/form-panels/create.js | 45 +------------------ .../form-panels/create/wizard.hbs | 32 +------------ 2 files changed, 2 insertions(+), 75 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 8d94a82be3..27c13e94c0 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 @@ -134,24 +134,6 @@ define(function(require) { $('input[name="ds_tab_custom_tm_mad"]', dialog).parent().hide(); }); - $('input[name="custom_vcenter_adapter_type"]',dialog).parent().hide(); - $('select#vcenter_adapter_type',dialog).change(function(){ - if ($(this).val() == "custom"){ - $('input[name="custom_vcenter_adapter_type"]',dialog).attr("required", true).parent().show(); - } else { - $('input[name="custom_vcenter_adapter_type"]',dialog).attr("required", false).parent().hide(); - } - }); - - $('input[name="custom_vcenter_disk_type"]',dialog).parent().hide(); - $('select#vcenter_disk_type',dialog).change(function(){ - if ($(this).val() == "custom"){ - $('input[name="custom_vcenter_disk_type"]',dialog).attr("required", true).parent().show(); - } else { - $('input[name="custom_vcenter_disk_type"]',dialog).attr("required", false).parent().hide(); - } - }); - $('#presets', dialog).change(function() { _hideAll(dialog); var choice_str = $(this).val(); @@ -167,12 +149,6 @@ define(function(require) { $('select#tm_mad', dialog).val($(opt).attr("tm")).change(); } - $('select#vcenter_adapter_type', dialog).attr('required', false); - $('select#vcenter_disk_type', dialog).attr('required', false); - - $('input[name="custom_vcenter_adapter_type"]',dialog).attr('required', false); - $('input[name="custom_vcenter_disk_type"]',dialog).attr('required', false); - switch (choice_str){ case "fs_shared": _selectFilesystem(dialog); @@ -195,10 +171,6 @@ define(function(require) { case "vcenter": $('input#system_ds_type', dialog).attr('disabled', 'disabled'); $('input#file_ds_type', dialog).attr('disabled', 'disabled'); - - $('select#vcenter_adapter_type', dialog).attr('required', true); - $('select#vcenter_disk_type', dialog).attr('required', true); - _selectvCenter(dialog); break; @@ -262,10 +234,7 @@ define(function(require) { var iscsi_user = $('#iscsi_user', dialog).val(); var iscsi_usage = $('#iscsi_usage', dialog).val(); var vcenter_cluster = $('#vcenter_cluster', dialog).val(); - var vcenter_adapter_type = $('#vcenter_adapter_type', dialog).val(); - vcenter_adapter_type = vcenter_adapter_type == "custom" ? $('input[name="custom_vcenter_adapter_type"]', dialog).val() : vcenter_adapter_type; - var vcenter_disk_type = $('#vcenter_disk_type', dialog).val(); - vcenter_disk_type = vcenter_disk_type == "custom" ? $('input[name="custom_vcenter_disk_type"]', dialog).val() : vcenter_disk_type; + var ds_obj = { "datastore" : { "name" : name, @@ -347,12 +316,6 @@ define(function(require) { if (vcenter_cluster) ds_obj.datastore.vcenter_cluster = vcenter_cluster; - if (vcenter_adapter_type) - ds_obj.datastore.adapter_type = vcenter_adapter_type; - - if (vcenter_disk_type) - ds_obj.datastore.disk_type = vcenter_disk_type; - Sunstone.runAction("Datastore.create", ds_obj); return false; } @@ -398,8 +361,6 @@ define(function(require) { $('label[for="iscsi_user"],input#iscsi_user', dialog).parent().hide(); $('label[for="iscsi_usage"],input#iscsi_usage', dialog).parent().hide(); $('label[for="vcenter_cluster"],input#vcenter_cluster', dialog).parent().hide(); - $('label[for="vcenter_adapter_type"],input#vcenter_adapter_type', dialog).parent().hide(); - $('label[for="vcenter_disk_type"],input#vcenter_disk_type', dialog).parent().hide(); $('label[for="limit_transfer_bw"],input#limit_transfer_bw', dialog).parent().hide(); $('label[for="no_decompress"],input#no_decompress', dialog).parent().hide(); @@ -428,8 +389,6 @@ define(function(require) { $('label[for="iscsi_user"],input#iscsi_user', dialog).parent().show(); $('label[for="iscsi_usage"],input#iscsi_usage', dialog).parent().show(); $('label[for="vcenter_cluster"],input#vcenter_cluster', dialog).parent().show(); - $('label[for="vcenter_adapter_type"],input#vcenter_adapter_type', dialog).parent().show(); - $('label[for="vcenter_disk_type"],input#vcenter_disk_type', dialog).parent().show(); $('label[for="limit_transfer_bw"],input#limit_transfer_bw', dialog).parent().show(); $('label[for="no_decompress"],input#no_decompress', dialog).parent().show(); @@ -528,8 +487,6 @@ define(function(require) { $('input#limit_mb', dialog).attr('disabled', 'disabled'); $('input#restricted_dirs', dialog).attr('disabled', 'disabled'); $('label[for="vcenter_cluster"],input#vcenter_cluster', dialog).parent().fadeIn(); - $('label[for="vcenter_adapter_type"],input#vcenter_adapter_type', dialog).parent().fadeIn(); - $('label[for="vcenter_disk_type"],input#vcenter_disk_type', dialog).parent().fadeIn(); } function _selectCustom(dialog) { diff --git a/src/sunstone/public/app/tabs/datastores-tab/form-panels/create/wizard.hbs b/src/sunstone/public/app/tabs/datastores-tab/form-panels/create/wizard.hbs index ac1935ed0a..9dc0c57e24 100644 --- a/src/sunstone/public/app/tabs/datastores-tab/form-panels/create/wizard.hbs +++ b/src/sunstone/public/app/tabs/datastores-tab/form-panels/create/wizard.hbs @@ -254,7 +254,7 @@
-
-
- - -
- -
-
-
- - -
- -
-