diff --git a/ui/scripts/system.js b/ui/scripts/system.js index b592bdb6178..6e0b8c771b8 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -6077,125 +6077,7 @@ return 'Added new primary storage'; } } - }, - - enableMaintenanceMode: { - label: 'Enable Maintenace' , - action: function(args) { - $.ajax({ - url: createURL("enableStorageMaintenance&id=" + args.context.primarystorages[0].id), - dataType: "json", - async: true, - success: function(json) { - var jid = json.prepareprimarystorageformaintenanceresponse.jobid; - args.response.success( - {_custom: - {jobId: jid, - getUpdatedItem: function(json) { - return json.queryasyncjobresultresponse.jobresult.storagepool; - }, - getActionFilter: function() { - return primarystorageActionfilter; - } - } - } - ); - } - }); - }, - messages: { - confirm: function(args) { - return 'Warning: placing the primary storage into maintenance mode will cause all VMs using volumes from it to be stopped. Do you want to continue?'; - }, - success: function(args) { - return 'Maintenance is being enabled.'; - }, - notification: function(args) { - return 'Enabling maintenance'; - }, - complete: function(args) { - return 'Maintenance has been enabled.'; - } - }, - notification: { - poll: pollAsyncJobResult - } - }, - - cancelMaintenanceMode: { - label: 'Cancel Maintenace' , - action: function(args) { - $.ajax({ - url: createURL("cancelStorageMaintenance&id=" + args.context.primarystorages[0].id), - dataType: "json", - async: true, - success: function(json) { - var jid = json.cancelprimarystoragemaintenanceresponse.jobid; - args.response.success( - {_custom: - {jobId: jid, - getUpdatedItem: function(json) { - return json.queryasyncjobresultresponse.jobresult.storagepool; - }, - getActionFilter: function() { - return primarystorageActionfilter; - } - } - } - ); - } - }); - }, - messages: { - confirm: function(args) { - return 'Please confirm that you want to cancel this maintenance.'; - }, - success: function(args) { - return 'Maintenance is being cancelled.'; - }, - notification: function(args) { - return 'Cancelling maintenance'; - }, - complete: function(args) { - return 'Maintenance has been cancelled.'; - } - }, - notification: { - poll: pollAsyncJobResult - } - }, - - 'delete': { - label: 'Delete' , - messages: { - confirm: function(args) { - return 'Please confirm that you want to delete this primary storage.'; - }, - success: function(args) { - return 'Primary storage is being deleted.'; - }, - notification: function(args) { - return 'Deleting primary storage'; - }, - complete: function(args) { - return 'Primary storage has been deleted.'; - } - }, - action: function(args) { - $.ajax({ - url: createURL("deleteStoragePool&id=" + args.context.primarystorages[0].id), - dataType: "json", - async: true, - success: function(json) { - args.response.success({data:{}}); - } - }); - }, - notification: { - poll: function(args) { args.complete(); } - } - } - + } }, detailView: {