anmolbabu has posted comments on this change.

Change subject: webadmin: UI for gluster volume snapshot creation
......................................................................


Patch Set 25:

(7 comments)

https://gerrit.ovirt.org/#/c/35082/25/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java:

Line 111:         }
Line 112: 
Line 113:         getNewSnapshotCommand().setIsAvailable(allowCreateSnapshot);
Line 114: 
Line 115:         boolean allowEditSnapshotSchedule = false;
can you please this declaration above near boolean allowCreateSnapshot = true;
Line 116:         if (getEntity() != null && getEntity().getStatus() == 
GlusterStatus.UP && getEntity().getSnapshotScheduled()) {
Line 117:             allowEditSnapshotSchedule = true;
Line 118:         }
Line 119: 


Line 127:         if (command.equals(getNewSnapshotCommand())) {
Line 128:             newSnapshot();
Line 129:         } else if 
(command.getName().equalsIgnoreCase("onCreateSnapshot")) {//$NON-NLS-1$
Line 130:             onCreateSnapshot();
Line 131:         } else if (command.getName().equalsIgnoreCase("Cancel")) 
{//$NON-NLS-1$
lower case first?
Line 132:             setWindow(null);
Line 133:         } else if (command.equals(getEditSnapshotScheduleCommand())) {
Line 134:             editSnapshotSchedule();
Line 135:         } else if 
(command.getName().equalsIgnoreCase("onEditSnapshotSchedule")) {//$NON-NLS-1$


Line 170: 
Line 171:         
snapshotModel.getClusterName().setEntity(volumeEntity.getVdsGroupName());
Line 172:         
snapshotModel.getVolumeName().setEntity(volumeEntity.getName());
Line 173: 
Line 174:         UICommand okCommand = new UICommand("onCreateSnapshot", 
this); //$NON-NLS-1$
why not use UICommand.createOkUiCommand?
Line 175:         okCommand.setTitle(constants.ok());
Line 176:         okCommand.setIsDefault(true);
Line 177:         snapshotModel.getCommands().add(okCommand);
Line 178: 


Line 175:         okCommand.setTitle(constants.ok());
Line 176:         okCommand.setIsDefault(true);
Line 177:         snapshotModel.getCommands().add(okCommand);
Line 178: 
Line 179:         UICommand cancelCommand = new UICommand("Cancel", this); 
//$NON-NLS-1$
UICommand.createCancelUiCommand?
Line 180:         cancelCommand.setTitle(constants.cancel());
Line 181:         cancelCommand.setIsCancel(true);
Line 182:         snapshotModel.getCommands().add(cancelCommand);
Line 183:     }


https://gerrit.ovirt.org/#/c/35082/25/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotModel.java:

Line 35:     private boolean scheduleTabVisible;
Line 36:     private ListModel<String> timeZones;
Line 37:     private EntityModel<Date> startAt;
Line 38:     private EntityModel<Date> executionTime;
Line 39:     private ListModel<String> daysOfWeek;
This is going to change a little the latest patch already has the change but I 
need to get the dependency to be pulled in appropriately but will let you know 
once that's done
Line 40:     private ListModel<String> daysOfMonth;
Line 41: 
Line 42:     public 
GlusterVolumeSnapshotModel(List<GlusterVolumeSnapshotScheduleRecurrence> 
recurrenceOptions,
Line 43:             boolean generalTabVisible,


Line 36:     private ListModel<String> timeZones;
Line 37:     private EntityModel<Date> startAt;
Line 38:     private EntityModel<Date> executionTime;
Line 39:     private ListModel<String> daysOfWeek;
Line 40:     private ListModel<String> daysOfMonth;
Same here
Line 41: 
Line 42:     public 
GlusterVolumeSnapshotModel(List<GlusterVolumeSnapshotScheduleRecurrence> 
recurrenceOptions,
Line 43:             boolean generalTabVisible,
Line 44:             boolean scheduleTabVisible) {


Line 70:         endByOptions.setItems(Arrays.asList(EndDateOptions.values()));
Line 71: 
Line 72:         List<String> values = new ArrayList<>();
Line 73:         for (DayOfWeek day : DayOfWeek.values()) {
Line 74:             values.add(day.toString().substring(0, 3));
This is not localisable so I would like you to try @AlternateMessage mapping 
enums to corresponding strings in UIMessages as in 

http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/client/Messages.AlternateMessage.html

Although constants of this kind would suffice our need.
Line 75:         }
Line 76:         daysOfWeek.setItems(values);
Line 77: //        daysOfWeek.setSelectedItem(null);
Line 78:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I823580ecb127e48e075c437668bfb19ff8ec4467
Gerrit-PatchSet: 25
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@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