bug 8680: disable standalone host feature in VMware

This commit is contained in:
Kelven Yang 2011-02-24 17:16:44 -08:00
parent 9e622c6a6c
commit ddee65162e
6 changed files with 43 additions and 15 deletions

View File

@ -377,6 +377,8 @@ dictionary = {
<select class="select" id="cluster_hypervisor">
</select>
</li>
<!-- CloudManaged cluster for VMware is disabled for now, it may be added back when we want to manage ESXi host directly -->
<!--
<li input_group="vmware">
<label>
<fmt:message key="label.cluster.type"/>:</label>
@ -387,6 +389,7 @@ dictionary = {
<div id="pod_dropdown_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
-->
<li input_group="vmware" input_sub_group="external">
<label for="cluster_hostname">
<fmt:message key="label.vcenter.host"/>:</label>

View File

@ -760,6 +760,9 @@
<select class="select" id="cluster_hypervisor">
</select>
</li>
<!-- CloudManaged cluster for VMware is disabled for now, it may be added back when we want to manage ESXi host directly -->
<!--
<li input_group="vmware">
<label>
<fmt:message key="label.cluster.type"/>:</label>
@ -770,7 +773,7 @@
<div id="pod_dropdown_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
-->
<li>
<label>
<fmt:message key="label.zone"/>:</label>

View File

@ -463,6 +463,8 @@ dictionary = {
-->
</select>
</li>
<!-- CloudManaged cluster for VMware is disabled for now, it may be added back when we want to manage ESXi host directly -->
<!--
<li input_group="vmware">
<label>
<fmt:message key="label.cluster.type"/>:</label>
@ -473,6 +475,7 @@ dictionary = {
<div id="pod_dropdown_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
-->
<li>
<label>
<fmt:message key="label.pod"/>:</label>

View File

@ -324,13 +324,18 @@ function bindAddClusterButton($leftmenuItem1) {
dialogAddCluster.find("#cluster_hypervisor").change(function() {
if($(this).val() == "VMware") {
$('li[input_group="vmware"]', dialogAddCluster).show();
dialogAddCluster.find("#type_dropdown").change();
$('li[input_sub_group="external"]', dialogAddCluster).show();
$("#cluster_name_label", dialogAddCluster).text("vCenter Cluster:");
// dialogAddCluster.find("#type_dropdown").change();
} else {
$('li[input_group="vmware"]', dialogAddCluster).hide();
$("#cluster_name_label", dialogAddCluster).text("Cluster:");
}
}).change();
/*
dialogAddCluster.find("#type_dropdown").change(function() {
if($(this).val() == "ExternalManaged") {
$('li[input_sub_group="external"]', dialogAddCluster).show();
@ -340,6 +345,7 @@ function bindAddClusterButton($leftmenuItem1) {
$("#cluster_name_label", dialogAddCluster).text("Cluster:");
}
});
*/
dialogAddCluster.dialog('option', 'buttons', {
"Add": function() {
@ -348,9 +354,11 @@ function bindAddClusterButton($leftmenuItem1) {
var hypervisor = $thisDialog.find("#cluster_hypervisor").val();
var clusterType="CloudManaged";
if(hypervisor == "VMware")
clusterType = $thisDialog.find("#type_dropdown").val();
if(hypervisor == "VMware") {
// clusterType = $thisDialog.find("#type_dropdown").val();
clusterType="ExternalManaged";
}
// validate values
var isValid = true;
if(hypervisor == "VMware" && clusterType != "CloudManaged") {

View File

@ -668,13 +668,16 @@ function initAddClusterShortcut() {
$hypervisorDropdown.change(function() {
if($(this).val() == "VMware") {
$('li[input_group="vmware"]', $dialogAddCluster).show();
$dialogAddCluster.find("#type_dropdown").change();
// $dialogAddCluster.find("#type_dropdown").change();
$('li[input_sub_group="external"]', $dialogAddCluster).show();
$("#cluster_name_label", $dialogAddCluster).text("vCenter Cluster:");
} else {
$('li[input_group="vmware"]', $dialogAddCluster).hide();
$("#cluster_name_label", $dialogAddCluster).text("Cluster:");
}
});
/*
$dialogAddCluster.find("#type_dropdown").change(function() {
if($(this).val() == "ExternalManaged") {
$('li[input_sub_group="external"]', $dialogAddCluster).show();
@ -684,6 +687,7 @@ function initAddClusterShortcut() {
$("#cluster_name_label", $dialogAddCluster).text("Cluster:");
}
});
*/
$("#add_cluster_shortcut").unbind("click").bind("click", function(event) {
$dialogAddCluster.find("#info_container").hide();
@ -699,8 +703,10 @@ function initAddClusterShortcut() {
// validate values
var hypervisor = $thisDialog.find("#cluster_hypervisor").val();
var clusterType="CloudManaged";
if(hypervisor == "VMware")
clusterType = $thisDialog.find("#type_dropdown").val();
if(hypervisor == "VMware") {
// clusterType = $thisDialog.find("#type_dropdown").val();
clusterType = "ExternalManaged";
}
var isValid = true;
isValid &= validateDropDownBox("Zone", $thisDialog.find("#zone_dropdown"), $thisDialog.find("#zone_dropdown_errormsg"));

View File

@ -537,13 +537,16 @@ function bindAddClusterButtonOnZonePage($button, zoneId, zoneName) {
$dialogAddCluster.find("#cluster_hypervisor").change(function() {
if($(this).val() == "VMware") {
$('li[input_group="vmware"]', $dialogAddCluster).show();
$dialogAddCluster.find("#type_dropdown").change();
// $dialogAddCluster.find("#type_dropdown").change();
$('li[input_sub_group="external"]', $dialogAddCluster).show();
$("#cluster_name_label", $dialogAddCluster).text("vCenter Cluster:");
} else {
$('li[input_group="vmware"]', $dialogAddCluster).hide();
$("#cluster_name_label", $dialogAddCluster).text("Cluster:");
}
}).change();
/*
$dialogAddCluster.find("#type_dropdown").change(function() {
if($(this).val() == "ExternalManaged") {
$('li[input_sub_group="external"]', $dialogAddCluster).show();
@ -553,7 +556,7 @@ function bindAddClusterButtonOnZonePage($button, zoneId, zoneName) {
$("#cluster_name_label", $dialogAddCluster).text("Cluster:");
}
});
*/
$dialogAddCluster.dialog('option', 'buttons', {
"Add": function() {
var $thisDialog = $(this);
@ -562,9 +565,11 @@ function bindAddClusterButtonOnZonePage($button, zoneId, zoneName) {
// validate values
var hypervisor = $thisDialog.find("#cluster_hypervisor").val();
var clusterType="CloudManaged";
if(hypervisor == "VMware")
clusterType = $thisDialog.find("#type_dropdown").val();
if(hypervisor == "VMware") {
// clusterType = $thisDialog.find("#type_dropdown").val();
clusterType="ExternalManaged";
}
var isValid = true;
isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg"));
if(hypervisor == "VMware" && clusterType != "CloudManaged") {