mirror of https://github.com/apache/cloudstack.git
new UI - cluster page - implement refresh button.
This commit is contained in:
parent
0273872b34
commit
76b31ab7b8
|
|
@ -59,6 +59,19 @@ function clusterJsonToDetailsTab() {
|
|||
var jsonObj = $leftmenuItem1.data("jsonObj");
|
||||
if(jsonObj == null)
|
||||
return;
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listClusters&id="+jsonObj.id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listclustersresponse.cluster;
|
||||
if(items != null && items.length > 0) {
|
||||
jsonObj = items[0];
|
||||
$leftmenuItem1.data("jsonObj", jsonObj);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var $detailsTab = $("#right_panel_content").find("#tab_content_details");
|
||||
$detailsTab.find("#id").text(fromdb(jsonObj.id));
|
||||
|
|
|
|||
|
|
@ -232,6 +232,10 @@ function resourceLoadPage(pageToShow, $midmenuItem1) { //$midmenuItem1 is eith
|
|||
}
|
||||
else if(pageToShow == "jsp/cluster.jsp") {
|
||||
afterLoadClusterJSP($midmenuItem1);
|
||||
|
||||
$(this).data("onRefreshFn", function() {
|
||||
clusterJsonToDetailsTab();
|
||||
});
|
||||
}
|
||||
else if(pageToShow == "jsp/host.jsp") {
|
||||
afterLoadHostJSP($midmenuItem1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue