Kanagaraj M has posted comments on this change.

Change subject: webadmin : Geo-rep Actions UI
......................................................................


Patch Set 16:

(4 comments)

http://gerrit.ovirt.org/#/c/32538/16/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeGeoRepActionConfirmationModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeGeoRepActionConfirmationModel.java:

Line 20:     private void init() {
Line 21:         setMasterVolume(new EntityModel<String>());
Line 22:         setSlaveVolume(new EntityModel<String>());
Line 23:         setSlaveHost(new EntityModel<String>());
Line 24:         setForce(new EntityModel<Boolean>());
This file can be ignored
Line 25: 
Line 26:     }
Line 27: 
Line 28:     protected void initWindow(GlusterGeoRepSession selectedSession) {


http://gerrit.ovirt.org/#/c/32538/16/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeGeoRepListModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeGeoRepListModel.java:

Line 187:         if (getSelectedItem() == null) {
Line 188:             allowStartSessionCommand = false;
Line 189:             allowStopSessionCommand = false;
Line 190:             allowResumeSessionCommand = false;
Line 191:             allowPauseSessionCommand = false;
These are not required since they are alreafy initialized to false above.

The below condition can be modified to 

 if( getSelectedItems()!= null && getSelectedItems().size() == 1) {
Line 192:         }
Line 193:         else if(getSelectedItems().size() == 1) {
Line 194:             GlusterGeoRepSession selectedSession = 
(GlusterGeoRepSession)getSelectedItem();
Line 195:             GeoRepSessionStatus sessionStatus = 
selectedSession.getStatus();


Line 230: 
Line 231:         } else if (command.equals(getRefreshSessionsCommand())) {
Line 232:             refreshSessions();
Line 233:         } else if 
(command.getName().equalsIgnoreCase("onStartGeoRepSession")) {//$NON-NLS-1$
Line 234:             
onGeoRepSessionAction(VdcActionType.StartGlusterVolumeGeoRep, true);
what if the user has not selected the 'force' option in the ui?
Line 235:         } else if 
(command.getName().equalsIgnoreCase("onStopGeoRepSession")) {//$NON-NLS-1$
Line 236:             onGeoRepSessionAction(VdcActionType.StopGeoRepSession, 
true);
Line 237:         } else if 
(command.getName().equalsIgnoreCase("onPauseGeoRepSession")) {//$NON-NLS-1$
Line 238:             
onGeoRepSessionAction(VdcActionType.PauseGlusterVolumeGeoRepSession, true);


Line 253:         okCommand.setIsDefault(true);
Line 254:         onGeoRepSessionAction(VdcActionType.StartGlusterVolumeGeoRep, 
false);
Line 255:         confirmGeoRepAction(constants.geoReplicationStartTitle(),
Line 256:                 HelpTag.volume_geo_rep_start_confirmation,
Line 257:                 "volume_geo_rep_start_confirmation", 
messages.geoRepForceHelp(constants.startVerb()), 
messages.geoRepForceTitle(constants.startVerb()), okCommand, 
constants.startVerb());//$NON-NLS-1$
There is a possibility of race-condition here.

there is no guarantee that setWindow() will be called before getWindow() for 
the first time.
Line 258:     }
Line 259: 
Line 260:     private void stopGeoRepSession() {
Line 261:         UICommand okCommand = new UICommand("onStopGeoRepSession", 
this);//$NON-NLS-1$


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I46fbd79f714175e3ad3ce76d858714c6fec3fdde
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@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

Reply via email to