Greg Padgett has uploaded a new change for review. Change subject: [WIP] webadmin: Enable Delete Snapshot while VM is running ......................................................................
[WIP] webadmin: Enable Delete Snapshot while VM is running Support the Live Merge operation in the UI. TODO: rebase patches, move this to after the new BLL/VDS command, else it won't compile. Change-Id: I5162b0bf83ab447a427b5376b7a0980acb7ef213 Bug-Url: https://bugzilla.redhat.com/?????? Signed-off-by: Greg Padgett <gpadg...@redhat.com> --- M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties 3 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/10/26910/1 diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java index e570916..d7b2109 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java @@ -653,6 +653,8 @@ String PROVIDER_IMPORT_CERTIFICATE_CHAIN_ERROR(); + String VM_NOT_QUALIFIED_FOR_SNAPSHOT_MERGE(); + String MIGRATION_DEST_INVALID_HOSTNAME(); String MIGRATION_CANCEL_ERROR(); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java index e0fdf9d..594acfe 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java @@ -373,8 +373,8 @@ VM vm = (VM) getEntity(); if (vm != null) { - Frontend.getInstance().runAction(VdcActionType.RemoveSnapshot, new RemoveSnapshotParameters(snapshot.getId(), - vm.getId()), null, null); + Frontend.getInstance().runAction(VdcActionType.RemoveSnapshot, + new RemoveSnapshotParameters(snapshot.getId(), vm.getId()), null, null); } getCanSelectSnapshot().setEntity(false); @@ -668,6 +668,7 @@ boolean isVmDown = vm != null && vm.getStatus() == VMStatus.Down; boolean isVmImageLocked = vm != null && vm.getStatus() == VMStatus.ImageLocked; + boolean isVmQualifiedForSnapshotMerge = vm != null && vm.getStatus().isQualifiedForSnapshotMerge(); boolean isPreviewing = getIsPreviewing(); boolean isLocked = getIsLocked(); boolean isSelected = snapshot != null && snapshot.getType() != SnapshotType.ACTIVE; @@ -681,7 +682,8 @@ getCustomPreviewCommand().setIsExecutionAllowed(getPreviewCommand().getIsExecutionAllowed()); getCommitCommand().setIsExecutionAllowed(isPreviewing && isVmDown && !isStateless); getUndoCommand().setIsExecutionAllowed(isPreviewing && isVmDown && !isStateless); - getRemoveCommand().setIsExecutionAllowed(isSelected && !isLocked && !isPreviewing && isVmDown && !isStateless); + getRemoveCommand().setIsExecutionAllowed(isSelected && !isLocked && !isPreviewing && !isStateless + && isVmQualifiedForSnapshotMerge); getCloneVmCommand().setIsExecutionAllowed(isSelected && !isLocked && !isPreviewing && !isVmImageLocked && !isStateless && isCloneVmSupported); } diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties index 3bcbe16..9128bf9 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties @@ -323,6 +323,7 @@ PROVIDER_FAILURE=Failed to communicate with the external provider. PROVIDER_IMPORT_CERTIFICATE_CHAIN_ERROR=Failed to import provider certificate chain. PROVIDER_SSL_FAILURE=SSL problem while trying to connect to the external provider. +VM_NOT_QUALIFIED_FOR_SNAPSHOT_MERGE=To merge snapshots, a VM must be Down, Up or Paused. MIGRATION_DEST_INVALID_HOSTNAME=Migration destination has an invalid hostname MIGRATION_CANCEL_ERROR=Migration not in progress DB=Database error. -- To view, visit http://gerrit.ovirt.org/26910 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5162b0bf83ab447a427b5376b7a0980acb7ef213 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Greg Padgett <gpadg...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches