diff --git a/ui/index.jsp b/ui/index.jsp
index ee578428fb0..3ea66faabda 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -848,7 +848,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js
index 1c93c62b04e..c8205284b16 100644
--- a/ui/scripts/cloud.core.pod.js
+++ b/ui/scripts/cloud.core.pod.js
@@ -771,7 +771,7 @@ function bindAddPrimaryStorageButton($leftmenuItem1) {
$clusterArrow.click();
}
- $("#cluster_"+clusterId+"_primarystorage").click();
+ $("#cluster_"+clusterId+"_primarystorage").show().click();
},
error: function(XMLHttpResponse) {
handleError(XMLHttpResponse, function() {
diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js
index a76c6899377..504c46ca8a9 100644
--- a/ui/scripts/cloud.core.resource.js
+++ b/ui/scripts/cloud.core.resource.js
@@ -238,8 +238,7 @@ function buildZoneTree() {
switch (targetId) {
case "cluster_arrow" :
var $loadingContainer = $thisNode.find("#cluster_loading_container").show();
- var $clusterArrow = $thisNode.find("#cluster_arrow").hide();
-
+ var $clusterArrow = $thisNode.find("#cluster_arrow").hide();
var clusterObj = $thisNode.data("jsonObj");
var $clusterContent = $thisNode.find("#cluster_content");
if($target.hasClass("expanded_close")) {
@@ -248,31 +247,21 @@ function buildZoneTree() {
dataType: "json",
async: false,
success: function(json) {
- var items = json.listhostsresponse.host;
- var $container = $clusterContent.find("#hosts_container").empty();
+ var items = json.listhostsresponse.host;
if (items != null && items.length > 0) {
- for (var i = 0; i < items.length; i++) {
- var $hostNode = $("#leftmenu_host_node_template").clone(true);
- hostJSONToTreeNode(items[i], $hostNode);
- $container.append($hostNode.show());
- }
+ $clusterContent.find("#cluster_"+clusterObj.id+"_host").show();
}
}
});
$.ajax({
data: createURL("command=listStoragePools&clusterid="+clusterObj.id),
- dataType: "json",
+ dataType: "json",
+ async: false,
success: function(json) {
- var items = json.liststoragepoolsresponse.storagepool;
- var $container = $clusterContent.find("#primarystorages_container").empty();
+ var items = json.liststoragepoolsresponse.storagepool;
if(items != null && items.length > 0) {
- var $template = $("#leftmenu_primarystorage_node_template");
- for(var i=0; i