diff --git a/ui/index.jsp b/ui/index.jsp
index fd55bef366a..ee578428fb0 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -863,9 +863,22 @@
-->
-
+
+
+
+
+
+
diff --git a/ui/scripts/cloud.core.primarystorage.js b/ui/scripts/cloud.core.primarystorage.js
index f0ec2ba41be..31bc84bc91e 100644
--- a/ui/scripts/cloud.core.primarystorage.js
+++ b/ui/scripts/cloud.core.primarystorage.js
@@ -16,6 +16,38 @@
*
*/
+
+function primarystorageGetSearchParams() {
+ var moreCriteria = [];
+
+ /*
+ var searchInput = $("#basic_search").find("#search_input").val();
+ if (searchInput != null && searchInput.length > 0) {
+ moreCriteria.push("&keyword="+todb(searchInput));
+ }
+
+ var $advancedSearchPopup = getAdvancedSearchPopupInSearchContainer();
+ if ($advancedSearchPopup.length > 0 && $advancedSearchPopup.css("display") != "none" ) {
+
+ var state = $advancedSearchPopup.find("#adv_search_state").val();
+ if (state!=null && state.length > 0)
+ moreCriteria.push("&state="+todb(state));
+
+ var zone = $advancedSearchPopup.find("#adv_search_zone").val();
+ if (zone!=null && zone.length > 0)
+ moreCriteria.push("&zoneId="+zone);
+
+ if ($advancedSearchPopup.find("#adv_search_pod_li").css("display") != "none") {
+ var pod = $advancedSearchPopup.find("#adv_search_pod").val();
+ if (pod!=null && pod.length > 0)
+ moreCriteria.push("&podId="+pod);
+ }
+ }
+ */
+
+ return moreCriteria.join("");
+}
+
function primarystorageGetMidmenuId(jsonObj) {
return "midmenuItem_primarystorage_" + jsonObj.id;
}
diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js
index f4ffd2322c2..a76c6899377 100644
--- a/ui/scripts/cloud.core.resource.js
+++ b/ui/scripts/cloud.core.resource.js
@@ -220,6 +220,16 @@ function buildZoneTree() {
return false;
});
+ $("#leftmenu_primarystorage_node_template").unbind("click").bind("click", function(event) {
+ selectRowInZoneTree($(this).find("#primarystorage_header"));
+
+ primarystorageClearRightPanel();
+ var clusterObj = $(this).data("clusterObj");
+ listMidMenuItems(("listStoragePools&clusterid="+clusterObj.id), primarystorageGetSearchParams, "liststoragepoolsresponse", "storagepool", "jsp/primarystorage.jsp", afterLoadPrimaryStorageJSP, primarystorageToMidmenu, primarystorageToRightPanel, getMidmenuId, false, ("cluster_"+clusterObj.id+"_primarystorage"));
+
+ return false;
+ });
+
$("#leftmenu_cluster_node_template").unbind("click").bind("click", function(event) {
var $thisNode = $(this);
var $target = $(event.target);
@@ -340,6 +350,7 @@ function buildZoneTree() {
});
*/
+ /*
$("#leftmenu_primarystorage_node_template").unbind("click").bind("click", function(event) {
var $thisNode = $(this);
selectRowInZoneTree($thisNode.find("#primarystorage_header"));
@@ -367,6 +378,7 @@ function buildZoneTree() {
return false;
});
+ */
}
function refreshClusterUnderPod($podNode, newClusterName, existingClusterId, noClicking) {
@@ -463,6 +475,7 @@ function clusterJSONToTreeNode(json, $clusterNode) {
$clusterNode.attr("id", "cluster_"+json.id);
$clusterNode.data("jsonObj", json);
$clusterNode.find("#leftmenu_host_node_template").data("clusterObj", json).attr("id",("cluster_"+json.id+"_host"));
+ $clusterNode.find("#leftmenu_primarystorage_node_template").data("clusterObj", json).attr("id",("cluster_"+json.id+"_primarystorage"));
$clusterNode.data("id", json.id).data("name", fromdb(json.name));
var clusterName = $clusterNode.find("#cluster_name").text(fromdb(json.name));
clusterName.data("jsonObj", json);