anmolbabu has posted comments on this change.

Change subject: gluster: show warning in rebalance and remove brick
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.ovirt.org/#/c/30199/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/RemoveBrickPopupView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/RemoveBrickPopupView.java:

Line 75:             ApplicationResources resources,
Line 76:             ApplicationConstants constants,
Line 77:             ApplicationTemplates templates) {
Line 78:         super(eventBus, resources);
Line 79:         initEditors(constants, resources, templates);
Since you have extracted constants as a class variable. I think you can 
initialise this before initEditors call and also avoid passing it. Just like 
localize(). You probably missed this.
Line 80:         initWidget(ViewUiBinder.uiBinder.createAndBindUi(this));
Line 81:         ViewIdHandler.idHandler.generateAndSetIds(this);
Line 82:         this.constants = constants;
Line 83:         localize();


Line 126:                 }
Line 127:             }
Line 128:         });
Line 129: 
Line 130:         
object.getMigrateData().getEntityChangedEvent().addListener(new 
IEventListener() {
Also I remember kanagaraj used to prefer property change events as 
above.Probably bcoz all entity changes can be handled there itself.
Line 131:             @Override
Line 132:             public void eventRaised(Event ev, Object sender, 
EventArgs args) {
Line 133:                 if(object.getMigrateData().getEntity()){
Line 134:                     
warningLabel.setText(RemoveBrickPopupView.this.constants.removeBrickDataMigrationWarning());


Line 130:         
object.getMigrateData().getEntityChangedEvent().addListener(new 
IEventListener() {
Line 131:             @Override
Line 132:             public void eventRaised(Event ev, Object sender, 
EventArgs args) {
Line 133:                 if(object.getMigrateData().getEntity()){
Line 134:                     
warningLabel.setText(RemoveBrickPopupView.this.constants.removeBrickDataMigrationWarning());
It could be simply constants.removeBrickDataMigrationWarning()
Line 135:                 }else{
Line 136:                     
warningLabel.setText(RemoveBrickPopupView.this.constants.removeBricksWarning());
Line 137:                 }
Line 138:             }


Line 132:             public void eventRaised(Event ev, Object sender, 
EventArgs args) {
Line 133:                 if(object.getMigrateData().getEntity()){
Line 134:                     
warningLabel.setText(RemoveBrickPopupView.this.constants.removeBrickDataMigrationWarning());
Line 135:                 }else{
Line 136:                     
warningLabel.setText(RemoveBrickPopupView.this.constants.removeBricksWarning());
Same as above
Line 137:                 }
Line 138:             }
Line 139:         });
Line 140:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cbf4043c848a26bdbc2a796ebe79f5af87b31f5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Karnan t c <[email protected]>
Gerrit-Reviewer: Ramesh N <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to