1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

B #4928: Error message disk resize vcenter with snapshot (#49)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
This commit is contained in:
Frederick Borges 2020-06-24 17:28:45 +02:00 committed by GitHub
parent b9092758e2
commit 56a868cf81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -652,8 +652,18 @@ define(function(require) {
});
}
if (Config.isTabActionEnabled("vms-tab", "VM.disk_resize")) {
context.off('click', '.disk_resize');
context.off('click', '.disk_resize');
context.on('click', '.disk_resize', function() {
// Error message when try to resize a disk on a
// VM with VCenter hypervisor and snapshots.
if (that && that.element &&
that.element.TEMPLATE && that.element.TEMPLATE.SNAPSHOT &&
that.element.USER_TEMPLATE && that.element.USER_TEMPLATE.HYPERVISOR=="vcenter"){
Notifier.notifyError("'disk-resize' operation not supported for VMs with snapshots");
return false;
}
var disk_id = $(this).parents('tr').attr('disk_id');
var disk_size = "";
if(Array.isArray(that.element.TEMPLATE.DISK)){