diff --git a/ui/jsp/resource.jsp b/ui/jsp/resource.jsp index 8e99ce5c829..e46a2158db9 100644 --- a/ui/jsp/resource.jsp +++ b/ui/jsp/resource.jsp @@ -957,9 +957,9 @@
  • - -
  • diff --git a/ui/jsp/zone.jsp b/ui/jsp/zone.jsp index 542fd90ed67..eb06a31ab4d 100644 --- a/ui/jsp/zone.jsp +++ b/ui/jsp/zone.jsp @@ -533,9 +533,9 @@ dictionary = {
  • - -
  • diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index 057dfe2f401..10ace466606 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -913,13 +913,7 @@ function initAddHostShortcut() { $thisDialog.find("#spinning_wheel").show() var array1 = []; - - /* - var hypervisor = $thisDialog.find("#host_hypervisor").val(); - if(hypervisor.length > 0) - array1.push("&hypervisor="+hypervisor); - */ - + var zoneId = $thisDialog.find("#zone_dropdown").val(); array1.push("&zoneid="+zoneId); @@ -1667,7 +1661,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel var podId = $(this).val(); if(podId == null || podId.length == 0) return; - var $clusterSelect = $dialogAddPool.find("#cluster_select").empty(); + var $clusterSelect = $dialogAddPool.find("#pool_cluster").empty(); $.ajax({ data: createURL("command=listClusters&podid=" + podId), dataType: "json", @@ -1689,7 +1683,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel }); }); - $dialogAddPool.find("#cluster_select").change(function() { + $dialogAddPool.find("#pool_cluster").change(function() { var curOption = $(this).val(); if(!curOption) return false; @@ -1734,7 +1728,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel var isValid = true; isValid &= validateDropDownBox("Zone", $thisDialog.find("#zone_dropdown"), $thisDialog.find("#zone_dropdown_errormsg")); isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg")); - isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text + isValid &= validateDropDownBox("Cluster", $thisDialog.find("#pool_cluster"), $thisDialog.find("#pool_cluster_errormsg"), false); //required, reset error text isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg")); if (protocol == "nfs" || protocol == "PreSetup" || protocol == "SharedMountPoint") { isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg")); @@ -1766,7 +1760,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel var podId = $thisDialog.find("#pod_dropdown").val(); array1.push("&podId="+podId); - var clusterId = $thisDialog.find("#cluster_select").val(); + var clusterId = $thisDialog.find("#pool_cluster").val(); array1.push("&clusterid="+clusterId); var name = trim($thisDialog.find("#add_pool_name").val()); diff --git a/ui/scripts/cloud.core.zone.js b/ui/scripts/cloud.core.zone.js index 7d8db1e3841..e53be775a4f 100644 --- a/ui/scripts/cloud.core.zone.js +++ b/ui/scripts/cloud.core.zone.js @@ -701,10 +701,7 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) { "Add": function() { var $thisDialog = $(this); $thisDialog.find("#info_container").hide(); - - //var hypervisor = $thisDialog.find("#host_hypervisor").val(); - //var clusterRadio = $thisDialog.find("input[name=cluster]:checked").val(); - + // validate values var isValid = true; isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg")); @@ -790,8 +787,7 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) { dataType: "json", success: function(json) { $thisDialog.find("#spinning_wheel").hide(); - $thisDialog.dialog("close"); - //expandClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, clusterId, $thisDialog); //expand cluster node to see host node + $thisDialog.dialog("close"); }, error: function(XMLHttpResponse) { handleError(XMLHttpResponse, function() { @@ -836,7 +832,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { var podId = $(this).val(); if(podId == null || podId.length == 0) return; - var $clusterSelect = $dialogAddPool.find("#cluster_select").empty(); + var $clusterSelect = $dialogAddPool.find("#pool_cluster").empty(); $.ajax({ data: createURL("command=listClusters&podid=" + podId), dataType: "json", @@ -859,7 +855,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { }); }); - $("#cluster_select", $dialogAddPool).unbind("change").bind("change", function(event) { + $("#pool_cluster", $dialogAddPool).unbind("change").bind("change", function(event) { var curOption = $(this).val(); if(!curOption) return false; @@ -903,7 +899,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { var isValid = true; isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg")); - isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text + isValid &= validateDropDownBox("Cluster", $thisDialog.find("#pool_cluster"), $thisDialog.find("#pool_cluster_errormsg"), false); //required, reset error text isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg")); if (protocol == "nfs" || protocol == "PreSetup" || protocol == "SharedMountPoint") { isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg")); @@ -934,7 +930,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { var podId = $thisDialog.find("#pod_dropdown").val(); array1.push("&podId="+podId); - var clusterId = $thisDialog.find("#cluster_select").val(); + var clusterId = $thisDialog.find("#pool_cluster").val(); array1.push("&clusterid="+clusterId); var name = trim($thisDialog.find("#add_pool_name").val());