mirror of https://github.com/apache/cloudstack.git
cloudstack 3.0 new UI - system - primary storages page - from actions from listView since they are available in detailView.
This commit is contained in:
parent
0526a8f337
commit
5e21af79dc
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue