1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Revert "Bug #4566: vcenter adapter and disk type inputs in DS wizard"

This reverts commit 6a6caeb04b9dcab3f48c04da09702114e9cf724e.
This commit is contained in:
Carlos Martín 2016-10-11 12:00:51 +02:00
parent 238095c142
commit c759372039
2 changed files with 2 additions and 75 deletions

View File

@ -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) {

View File

@ -254,7 +254,7 @@
<input type="text" name="iscsi_usage" id="iscsi_usage" />
</div>
<div class="medium-6 columns">
<label for="vcenter_cluster">
<label for="vceter_cluster">
{{tr "vCenter cluster"}}
<span class="tip">
{{tr "The vCenter Cluster that has access to this datastore."}}
@ -262,35 +262,5 @@
</label>
<input type="text" name="vcenter_cluster" id="vcenter_cluster" />
</div>
<div class="medium-6 columns end">
<label for="vcenter_adapter_type">
{{tr "Bus adapter controller"}}
</label>
<select name="vcenter_adapter_type" id="vcenter_adapter_type">
<option value="" selected="selected"></option>
<option value="lsiLogic">lsiLogic</option>
<option value="ide">ide</option>
<option value="busLogic">busLogic</option>
<option value="custom">custom</option>
</select>
<div>
<input type="text" id="custom_vcenter_adapter_type" name="custom_vcenter_adapter_type" />
</div>
</div>
<div class="medium-6 columns end">
<label for="vcenter_disk_type">
{{tr "Disk provisioning type"}}
</label>
<select name="vcenter_disk_type" id="vcenter_disk_type">
<option value="" selected="selected"></option>
<option value="thin">Thin</option>
<option value="thick">Thick</option>
<option value="eagerZeroedThick">Eager Zeroed Thick</option>
<option value="custom">custom</option>
</select>
<div>
<input type="text" id="custom_vcenter_disk_type" name="custom_vcenter_disk_type" />
</div>
</div>
</div>
</form>