diff --git a/ui/scripts/cloud.core.instance.js b/ui/scripts/cloud.core.instance.js index 0510516d7f0..5895d02ce2b 100644 --- a/ui/scripts/cloud.core.instance.js +++ b/ui/scripts/cloud.core.instance.js @@ -1685,8 +1685,7 @@ function vmJsonToDetailsTab(){ var $thisTab = $("#right_panel_content").find("#tab_content_details"); $thisTab.find("#tab_container").hide(); $thisTab.find("#tab_spinning_wheel").show(); - - /* + var id = jsonObj.id; $.ajax({ data: createURL("command=listVirtualMachines&id="+id), @@ -1701,8 +1700,7 @@ function vmJsonToDetailsTab(){ } } }); - */ - + resetViewConsoleAction(jsonObj, $thisTab); setVmStateInRightPanel(jsonObj.state, $thisTab.find("#state")); $thisTab.find("#ipAddress").text(fromdb(jsonObj.ipaddress)); diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index c9ed33f0fae..ec3e3975828 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -126,16 +126,11 @@ function buildZoneTree() { var $thisNode = $(this); $("#right_panel").load("jsp/secondarystorage.jsp", function(){ currentRightPanelJSP = "jsp/secondarystorage.jsp"; - - /* + $(this).data("onRefreshFn", function() { - var zoneObj = $midmenuItem1.data("jsonObj"); - if(zoneObj == null) - return; - $("#zone_"+zoneObj.id).find("#secondarystorage_header").click(); + secondaryStorageJsonToDetailsTab(); }); - */ - + afterLoadSecondaryStorageJSP($thisNode); }); } @@ -304,7 +299,7 @@ function buildZoneTree() { var $topButtonContainer = clearButtonsOnTop(); $("#top_buttons").appendTo($topButtonContainer); - $thisNode.data("onRefreshFn", function() { + $(this).data("onRefreshFn", function() { clusterJsonToDetailsTab(); });