Kanagaraj M has posted comments on this change.

Change subject: webadmin : Create + Delete Geo-rep session
......................................................................


Patch Set 39:

(3 comments)

https://gerrit.ovirt.org/#/c/29691/39/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 373:     }
Line 374: 
Line 375:     private void onCreateSession() {
Line 376:         final GlusterVolumeGeoRepCreateModel createModel = 
(GlusterVolumeGeoRepCreateModel) getWindow();
Line 377:         createModel.startProgress(null);
You might want the validate the values filled in the ui, atleast not null
Line 378:         final Guid masterVolumeId = getEntity().getId();
Line 379:         final String remoteVolumeName = 
createModel.getSlaveVolumes().getSelectedItem().getName();
Line 380:         final String remoteHostName = 
createModel.getSlaveHosts().getSelectedItem();
Line 381:         String remoteUserName = 
createModel.getSlaveUserName().getEntity();


Line 379: getSelectedItem()
Possible NPE if there are no volumes selected


Line 399:                                                 remoteHostName),
Line 400:                                         new 
IFrontendActionAsyncCallback() {
Line 401:                                             @Override
Line 402:                                             public void 
executed(FrontendActionAsyncResult result) {
Line 403:                                                 closeWindow();
I think you need not wait for the 'start' operation to close the dialog. You 
could just do that once the creation successful. 

Otherwise, lets say creation succeeds and start fails. User will still be in 
the dialog. Now he has to click cancel the go to geo-rep tab to try to start 
the session again.

Also you could just re-use 'startGeoRepSession' here
Line 404:                                                 if 
(!result.getReturnValue().getSucceeded()) {
Line 405:                                                     
initializeGeoRepActionConfirmation(constants.geoReplicationStartTitle(),
Line 406:                                                             
HelpTag.volume_geo_rep_start_confirmation,
Line 407:                                                             
"volume_geo_rep_start_confirmation", constants.geoRepForceHelp(), 
messages.geoRepForceTitle(constants.startGeoRep()), 
"onStartGeoRepSession");//$NON-NLS-1$//$NON-NLS-2$


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ied7317d456bf66db9a7800ba7106f2e8ec66429c
Gerrit-PatchSet: 39
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@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