mirror of https://github.com/apache/cloudstack.git
new UI - cluster page - middle menu - add middle menu item header "Host" above hosts, "Primary Storage" above primary storages.
This commit is contained in:
parent
4a1b1fe5ce
commit
456b7a0ee0
|
|
@ -678,7 +678,7 @@ long milliseconds = new Date().getTime();
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="midmenu_itemheader" style="display:none;"><p>(type)</p></div>
|
||||
<div id="midmenu_itemheader" class="midmenu_itemheader" style="display:none;"><p id="name"></p></div>
|
||||
<div class="midmenu_list" id="midmenu_item" style="display: none;">
|
||||
<div class="midmenu_content" id="content">
|
||||
<div class="midmenu_icons" id="icon_container" style="display: none">
|
||||
|
|
|
|||
|
|
@ -817,6 +817,7 @@ function listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmen
|
|||
else
|
||||
disableMultipleSelectionInMidMenu();
|
||||
|
||||
var count = 0;
|
||||
$.ajax({
|
||||
cache: false,
|
||||
data: createURL("command="+commandString+"&pagesize="+midmenuItemCount),
|
||||
|
|
@ -840,9 +841,12 @@ function listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmen
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
count = items.length;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
function listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu) {
|
||||
|
|
|
|||
|
|
@ -270,12 +270,7 @@ function showPage2($pageToShow, $menuItem1) {
|
|||
$("#dialog_add_pool").find("#add_pool_protocol").empty().html('<option value="nfs">NFS</option>');
|
||||
bindEventHandlerToDialogAddPool();
|
||||
|
||||
podJsonToRightPanel($menuItem1);
|
||||
|
||||
//var podId = jsonObj.id;
|
||||
//$("#midmenu_container").empty();
|
||||
//listMidMenuItems2(("listHosts&type=Routing&podid="+podId), "listhostsresponse", "host", hostToMidmenu, hostToRightPanel, hostGetMidmenuId, false, false);
|
||||
//listMidMenuItems2(("listStoragePools&podid="+podId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRightPanel, primarystorageGetMidmenuId, false, false);
|
||||
podJsonToRightPanel($menuItem1);
|
||||
}
|
||||
else if($pageToShow.attr("id") == "cluster_page") {
|
||||
clearMiddleMenu();
|
||||
|
|
@ -288,9 +283,20 @@ function showPage2($pageToShow, $menuItem1) {
|
|||
clusterJsonToRightPanel($menuItem1);
|
||||
|
||||
var clusterId = jsonObj.id;
|
||||
$("#midmenu_container").empty();
|
||||
listMidMenuItems2(("listHosts&type=Routing&clusterid="+clusterId), "listhostsresponse", "host", hostToMidmenu, hostToRightPanel, hostGetMidmenuId, false, true);
|
||||
listMidMenuItems2(("listStoragePools&clusterid="+clusterId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRightPanel, primarystorageGetMidmenuId, false, false);
|
||||
var $midmenuContainer = $("#midmenu_container").empty();
|
||||
var $header1 = $("#midmenu_itemheader").clone();
|
||||
$header1.find("#name").text("Host");
|
||||
$midmenuContainer.append($header1);
|
||||
var count1 = listMidMenuItems2(("listHosts&type=Routing&clusterid="+clusterId), "listhostsresponse", "host", hostToMidmenu, hostToRightPanel, hostGetMidmenuId, false, true);
|
||||
if(count1 > 0)
|
||||
$header1.show();
|
||||
|
||||
var $header2 = $("#midmenu_itemheader").clone();
|
||||
$header2.find("#name").text("Primary Storage");
|
||||
$midmenuContainer.append($header2);
|
||||
var count2 = listMidMenuItems2(("listStoragePools&clusterid="+clusterId), "liststoragepoolsresponse", "storagepool", primarystorageToMidmenu, primarystorageToRightPanel, primarystorageGetMidmenuId, false, false);
|
||||
if(count2 > 0)
|
||||
$header2.show();
|
||||
}
|
||||
else if($pageToShow.attr("id") == "host_page") {
|
||||
initAddHostButton($("#midmenu_add_link"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue