From ce6055c090c27452a775ad1df17117ae13477b5b Mon Sep 17 00:00:00 2001 From: Boris Odnopozov Date: Thu, 29 Jun 2017 10:43:44 +0300 Subject: [PATCH] Disable delete button for the active snapshot on oVirt Disable the delete button when the active snapshot is selected for a vm on oVirt. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1443411 --- .../providers/redhat/infra_manager/vm/operations/snapshot.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/manageiq/providers/redhat/infra_manager/vm/operations/snapshot.rb b/app/models/manageiq/providers/redhat/infra_manager/vm/operations/snapshot.rb index 7b3314ada..4a47a0659 100644 --- a/app/models/manageiq/providers/redhat/infra_manager/vm/operations/snapshot.rb +++ b/app/models/manageiq/providers/redhat/infra_manager/vm/operations/snapshot.rb @@ -60,6 +60,10 @@ def revert_to_snapshot_denied_message(active = false) return _("Revert is not allowed for a snapshot that is the active one") if active end + def remove_snapshot_denied_message(active = false) + return _("Delete is not allowed for a snapshot that is the active one") if active + end + def snapshotting_memory_allowed? current_state == 'on' end