Greg Sheremeta has uploaded a new change for review.

Change subject: webadmin: cleanup StorageDeviceStatusCell
......................................................................

webadmin: cleanup StorageDeviceStatusCell

(Patch 4ao of 12)

Cleanup some messy code in StorageDeviceStatusCell.

No functional changes -- just a refactor.

Change-Id: I759073cdc01d4ba22bccb07d7b2ae54eaf38b3b7
Signed-off-by: Greg Sheremeta <gsher...@redhat.com>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDeviceStatusCell.java
1 file changed, 2 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/38/38738/1

diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDeviceStatusCell.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDeviceStatusCell.java
index 5c2fd1b..aa6a8b7 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDeviceStatusCell.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDeviceStatusCell.java
@@ -7,7 +7,6 @@
 import org.ovirt.engine.ui.webadmin.ApplicationTemplates;
 
 import com.google.gwt.core.client.GWT;
-import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.safehtml.shared.SafeHtml;
 import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
 import com.google.gwt.safehtml.shared.SafeHtmlUtils;
@@ -27,15 +26,9 @@
         }
 
         // Place a lock image to say that device is already in use and can't 
be used again
-        ImageResource statusImage = null;
-        String tooltip;
-        statusImage = resources.lockImage();
-        tooltip = constants.deviceIsAlreadyUsed();
-
-        // Generate the HTML for the image:
         SafeHtml statusImageHtml =
-                
SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML());
-        sb.append(templates.statusTemplate(statusImageHtml, tooltip, id));
+                
SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(resources.lockImage()).getHTML());
+        sb.append(templates.statusTemplate(statusImageHtml, 
constants.deviceIsAlreadyUsed(), id));
     }
 
 }


-- 
To view, visit https://gerrit.ovirt.org/38738
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I759073cdc01d4ba22bccb07d7b2ae54eaf38b3b7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <gsher...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to