cluster page - Add Host dialog - fix a bug that Join cluster field didn't have right default value (default value should be the cluster that's currently on)

This commit is contained in:
Jessica Wang 2010-12-29 21:00:55 -08:00
parent 2afc154da3
commit a73b9dd7fb

View File

@ -430,8 +430,6 @@ function bindAddHostButton($leftmenuItem1) {
dialogAddHost.find("#pod_name").text(fromdb(primarystorageObj.podname)); dialogAddHost.find("#pod_name").text(fromdb(primarystorageObj.podname));
} }
refreshClsuterFieldInAddHostDialog(dialogAddHost, podId, clusterId, dialogAddHost.find("#host_hypervisor").val());
dialogAddHost.find("#host_hypervisor").change(function() { dialogAddHost.find("#host_hypervisor").change(function() {
if($(this).val() == "VmWare") { if($(this).val() == "VmWare") {
$('li[input_group="vmware"]', dialogAddHost).show(); $('li[input_group="vmware"]', dialogAddHost).show();
@ -441,7 +439,7 @@ function bindAddHostButton($leftmenuItem1) {
$('li[input_group="general"]', dialogAddHost).show(); $('li[input_group="general"]', dialogAddHost).show();
} }
refreshClsuterFieldInAddHostDialog(dialogAddHost, podId, null, $(this).val()); refreshClsuterFieldInAddHostDialog(dialogAddHost, podId, clusterId, $(this).val());
}).change(); }).change();
dialogAddHost dialogAddHost
@ -555,7 +553,7 @@ function bindAddHostButton($leftmenuItem1) {
}, },
error: function(XMLHttpResponse) { error: function(XMLHttpResponse) {
handleError(XMLHttpResponse, function() { handleError(XMLHttpResponse, function() {
refreshClsuterFieldInAddHostDialog($thisDialog, podId, null, dialogAddHost.find("#host_hypervisor").val()); refreshClsuterFieldInAddHostDialog($thisDialog, podId, clusterId, dialogAddHost.find("#host_hypervisor").val());
handleErrorInDialog(XMLHttpResponse, $thisDialog); handleErrorInDialog(XMLHttpResponse, $thisDialog);
if(clusterRadio == "new_cluster_radio") { //*** new cluster *** if(clusterRadio == "new_cluster_radio") { //*** new cluster ***
refreshClusterUnderPod($("#pod_" + podId), newClusterName, null, true); //refresh clusters under pod, but no clicking at any cluster refreshClusterUnderPod($("#pod_" + podId), newClusterName, null, true); //refresh clusters under pod, but no clicking at any cluster