new UI - corresponding UI change after bug 6955 is fixed.

This commit is contained in:
Jessica Wang 2010-11-04 13:33:04 -07:00
parent cc6ee7adde
commit b8b4911233

View File

@ -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.");
}
},