Skip to content

Commit

Permalink
B #4928: Error message disk resize vcenter with snapshot (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: Frederick Borges <[email protected]>
  • Loading branch information
Frederick Borges authored and rsmontero committed Jun 24, 2020
1 parent 232edee commit b029ab7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/sunstone/public/app/tabs/vms-tab/panels/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)){
Expand Down

0 comments on commit b029ab7

Please sign in to comment.