diff --git a/ui/scripts/cloud.core.primarystorage.js b/ui/scripts/cloud.core.primarystorage.js index 0b376fdc372..d94b7f0323b 100644 --- a/ui/scripts/cloud.core.primarystorage.js +++ b/ui/scripts/cloud.core.primarystorage.js @@ -109,26 +109,10 @@ var primarystorageActionMap = { asyncJobResponse: "prepareprimarystorageformaintenanceresponse", dialogBeforeActionFn: doEnableMaintenanceModeForPrimaryStorage, inProcessText: "Enabling Maintenance Mode....", - afterActionSeccessFn: function(json, $midmenuItem1, id) { - //var item = json.queryasyncjobresultresponse.jobresult.prepareprimarystorageformaintenanceresponse; - ////item is {success: "true"}, not an embedded object of primary storage. It should an embedded object instead. Comment out the 4 lines until Bug 6955 is fixed. - //primarystorageToMidmenu(item, $midmenuItem1); - //primarystorageToRightPanel($midmenuItem1); - - //make extra API call before bug 6955 is fixed.(enableStorageMaintenance API should return an embedded object like cancelStorageMaintenance API does) - $.ajax({ - data: createURL("command=listStoragePools&id="+id), - dataType: "json", - success: function(json) { - var items = json.liststoragepoolsresponse.storagepool; - if(items != null && items.length > 0) { - item = items[0]; - primarystorageToMidmenu(item, $midmenuItem1); - primarystorageToRightPanel($midmenuItem1); - } - } - }); - + afterActionSeccessFn: function(json, $midmenuItem1, id) { + var item = json.queryasyncjobresultresponse.jobresult.prepareprimarystorageformaintenanceresponse; + primarystorageToMidmenu(item, $midmenuItem1); + primarystorageToRightPanel($midmenuItem1); $("#right_panel_content #after_action_info").text("We are actively enabling maintenance. Please refresh periodically for an updated status."); } },