Tal Nisan has uploaded a new change for review.

Change subject: webadmin: Grey out the remove button for template disks in 
storage disks tab
......................................................................

webadmin: Grey out the remove button for template disks in storage disks tab

In the storage disks sub tab the remove button was not greyed out for
template disks, this behaviour is different than the disks main tab which
greys out the button and was changed to fit the wanted behavior (the command
fails on a CDA anyway)

Change-Id: I54ddae6e950318d95a3f87e540b3d8d210abcd60
Signed-off-by: Tal Nisan <[email protected]>
Related-to: https://bugzilla.redhat.com/975040
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDiskListModel.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/44/24244/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDiskListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDiskListModel.java
index 98db6a4..69447cc 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDiskListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDiskListModel.java
@@ -123,7 +123,9 @@
         for (DiskImage disk : disks) {
             boolean isImageLocked = disk.getImageStatus() == 
ImageStatus.LOCKED;
 
-            if (isImageLocked) {
+            boolean isTemplateDisk = disk.getVmEntityType() != null && 
disk.getVmEntityType().isTemplateType();
+
+            if (isImageLocked || isTemplateDisk) {
                 return false;
             }
         }


-- 
To view, visit http://gerrit.ovirt.org/24244
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54ddae6e950318d95a3f87e540b3d8d210abcd60
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to