Kanagaraj M has posted comments on this change. Change subject: webadmin : Gluster Volume Profile ......................................................................
Patch Set 50: (5 comments) http://gerrit.ovirt.org/#/c/27470/50/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java: Line 161: private void onNfsServerSelectionChange(UIMessages messages) { Line 162: if(getNfsServers().getSelectedItem() == null) { Line 163: return; Line 164: } Line 165: int index = getProfileInfo().getNfsProfileDetails().indexOf(getNfsServers().getSelectedItem()); index could be -1, if the item is not found in the list i would suggest if item is not found, just return from this method Line 166: List<GlusterVolumeProfileStats> nfsProfileStats = getProfileInfo().getNfsProfileDetails(); Line 167: StatsInfo selectedNfsServerCummulativeProfile = nfsProfileStats.get(index).getProfileStats().get(0); Line 168: StatsInfo selectedNfsServerIntervalProfile = nfsProfileStats.get(index).getProfileStats().get(1); Line 169: populateCummulativeStatistics(selectedNfsServerCummulativeProfile.getFopStats(), getNfsServerProfileStats()); Line 173: Line 174: nfsBytesRead = String.copyValueOf((formatDataRead(messages, selectedNfsServerCummulativeProfile.getTotalRead(), selectedNfsServerIntervalProfile.getTotalRead())).toCharArray()); Line 175: onPropertyChanged(new PropertyChangedEventArgs("nfsProfileDataRead"));//$NON-NLS-1$ Line 176: Line 177: nfsBytesWritten = String.copyValueOf((formatDataWritten(messages, selectedNfsServerCummulativeProfile.getTotalWrite(), selectedNfsServerIntervalProfile.getTotalWrite())).toCharArray()); why are you converting to CharArray? Line 178: onPropertyChanged(new PropertyChangedEventArgs("nfsProfileDataWritten"));//$NON-NLS-1$ Line 179: } Line 180: Line 181: private void onBrickSelectionChange(UIMessages messages) { Line 181: private void onBrickSelectionChange(UIMessages messages) { Line 182: if(getBricks().getSelectedItem() == null) { Line 183: return; Line 184: } Line 185: int index = getProfileInfo().getBrickProfileDetails().indexOf(getBricks().getSelectedItem()); same here Line 186: List<BrickProfileDetails> profileStats = getProfileInfo().getBrickProfileDetails(); Line 187: StatsInfo selectedBrickProfileCummulativeStats = profileStats.get(index).getProfileStats().get(0); Line 188: StatsInfo selectedBrickProfileIntervalStats = profileStats.get(index).getProfileStats().get(1); Line 189: http://gerrit.ovirt.org/#/c/27470/50/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java: Line 761: Line 762: private void showVolumeProfiling() { Line 763: if(getSelectedItem() == null) { Line 764: return; Line 765: } you could do here itself if(getWindow() == null) { return; } Line 766: GlusterVolumeEntity selectedVolume = (GlusterVolumeEntity)getSelectedItem(); Line 767: VolumeProfileStatisticsModel profileStatsModel = new VolumeProfileStatisticsModel(selectedVolume.getClusterId(), selectedVolume.getId(), selectedVolume.getName()); Line 768: Line 769: if(getWindow() == null) { http://gerrit.ovirt.org/#/c/27470/50/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.java: Line 268: nfsRefreshIcon.setRefreshIconClickListener(nfsTabClickHandler); Line 269: Line 270: bricksTab.addClickHandler(brickTabClickHandler); Line 271: Line 272: nfsTab.addClickHandler(nfsTabClickHandler); i would suggest not to refresh the data when the user switches the tab, it will distract the user. Line 273: Line 274: object.getPropertyChangedEvent().addListener(new IEventListener() { Line 275: @Override Line 276: public void eventRaised(Event ev, Object sender, EventArgs args) { -- To view, visit http://gerrit.ovirt.org/27470 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic305a0fece18f29d24a9d0324391e484681fa033 Gerrit-PatchSet: 50 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: 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