anmolbabu has posted comments on this change. Change subject: engine,webadmin: Add an indicator if geo-replication is enabled ......................................................................
Patch Set 5: (3 comments) https://gerrit.ovirt.org/#/c/38310/5/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/VolumeInfoCell.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/VolumeInfoCell.java: Line 13: import com.google.gwt.safehtml.shared.SafeHtmlBuilder; Line 14: import com.google.gwt.safehtml.shared.SafeHtmlUtils; Line 15: import com.google.gwt.user.client.ui.AbstractImagePrototype; Line 16: Line 17: public class VolumeInfoCell extends AbstractCell<GlusterVolumeEntity> { Any reason why activities column is not used? Line 18: Line 19: private static final ApplicationResources resources = GWT.create(ApplicationResources.class); Line 20: private static final ApplicationConstants constants = GWT.create(ApplicationConstants.class); Line 21: private static final ApplicationTemplates applicationTemplates = GWT.create(ApplicationTemplates.class); Line 31: if (volume == null) { Line 32: return; Line 33: } Line 34: if (volume.getIsGeoRepMaster()) { Line 35: SafeHtml geoRepMasterHtml = Can it be like this : public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { // Nothing to render if no volume is provided: if (volume == null) { return; } ImageResource image = null; String tooltip = ""; //$NON-NLS-1$ if (volume.getIsGeoRepMaster()) { image = resources.volumeGeoRepMaster(); tooltip = constants.geoRepMasterVolumeToolTip() } if(volume.getIsGeoRepSlave()) { image = resources.volumeGeoRepSlave(); tooltip = messages.geoRepSlaveVolumeToolTip(formatVolClusterName(volume.getGeoRepMasterVolAndClusterName())) } sb.append(applicationTemplates.statusTemplate(SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(image).getHTML()), tooltip)); } Line 36: SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(geoRepMasterImage).getHTML()); Line 37: sb.append(applicationTemplates.statusTemplate(geoRepMasterHtml, constants.geoRepMasterVolumeToolTip())); Line 38: } Line 39: if (volume.getIsGeoRepSlave()) { Line 48: if (volClusterName == null) { Line 49: return null; Line 50: } Line 51: String[] names = volClusterName.split("\\|"); //$NON-NLS-1$ Line 52: return names.length == 2 ? names[0] + " (" + names[1] + ")" : names[0]; //$NON-NLS-1$ //$NON-NLS-2$ I feel this might look something like an alias name so why not pass both cluster and volume names to messages and then get a string like " Volume data from {0} of cluster {1} is replicated to this volume " Just a thought Line 53: } -- To view, visit https://gerrit.ovirt.org/38310 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28178b8ef03ea7cc83097cb99bc2d2be90061434 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches