mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
zonetree - clicking storage node would populate primary storages into middle menu.
This commit is contained in:
parent
98146d3b15
commit
d1a17cd053
17
ui/index.jsp
17
ui/index.jsp
@ -863,9 +863,22 @@
|
||||
<div id="hosts_container">
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<div class="leftmenu_expandedlist" id="leftmenu_primarystorage_node_template" style="display:block">
|
||||
<div id="primarystorage_header" class="leftmenu_content">
|
||||
<div class="leftmenu_sixthindent">
|
||||
<div class="leftmenu_arrowloader" id="primarystorage_loading_container" style="display:none;"></div>
|
||||
<div class="leftmenu_arrows white_nonexpanded_close" id="primarystorage_arrow">
|
||||
</div>
|
||||
<span>Storage</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div id="primarystorages_container">
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- cluster Template (end) -->
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user