new UI - cluster page - implement refresh button.

This commit is contained in:
Jessica Wang 2010-11-29 17:23:56 -08:00
parent 0273872b34
commit 76b31ab7b8
2 changed files with 17 additions and 0 deletions

View File

@ -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));

View File

@ -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);