anmolbabu has posted comments on this change. Change subject: webadmin : GeoRep Config popup view ......................................................................
Patch Set 12: (3 comments) https://gerrit.ovirt.org/#/c/34217/12/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeGeoReplicationSessionConfigModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeGeoReplicationSessionConfigModel.java: Line 97: Line 98: public LinkedList<GlusterGeoRepSessionConfiguration> calculateConfigDiff() { Line 99: Map<String, String> oldConfig = getConfigs(); Line 100: List<EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>>> newConfigPairs = (List<EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>>>) getConfigsModel().getItems(); Line 101: LinkedList<GlusterGeoRepSessionConfiguration> configDiff = new LinkedList<>(); > configsChanged? Removed this method forever Line 102: for(EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>> currentConfig : newConfigPairs) { Line 103: if (! currentConfig.getEntity().getFirst() && !currentConfig.getEntity().getSecond().getValue().equals(oldConfig.get(currentConfig.getEntity().getSecond().getKey()))) { Line 104: configDiff.add(currentConfig.getEntity().getSecond()); Line 105: } Line 99: Map<String, String> oldConfig = getConfigs(); Line 100: List<EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>>> newConfigPairs = (List<EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>>>) getConfigsModel().getItems(); Line 101: LinkedList<GlusterGeoRepSessionConfiguration> configDiff = new LinkedList<>(); Line 102: for(EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>> currentConfig : newConfigPairs) { Line 103: if (! currentConfig.getEntity().getFirst() && !currentConfig.getEntity().getSecond().getValue().equals(oldConfig.get(currentConfig.getEntity().getSecond().getKey()))) { > "currentConfig.getEntity().getSecond()" can be extracted to a variable to i Removed this method forever Line 104: configDiff.add(currentConfig.getEntity().getSecond()); Line 105: } Line 106: } Line 107: return configDiff; https://gerrit.ovirt.org/#/c/34217/12/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 307: (GlusterVolumeGeoReplicationSessionConfigModel) getWindow(); Line 308: geoRepConfigModel.startProgress(null); Line 309: geoRepConfigModel.setLocked(true); Line 310: setConfig(geoRepConfigModel); Line 311: resetConfig(geoRepConfigModel); > Why do u need to handle set and reset seperatly. Just loop over all all the Done using runMultipleActions now. Line 312: } Line 313: Line 314: private void resetConfig(final GlusterVolumeGeoReplicationSessionConfigModel geoRepConfigModel) { Line 315: List<EntityModel<Pair<Boolean, GlusterGeoRepSessionConfiguration>>> sessionConfigs = -- To view, visit https://gerrit.ovirt.org/34217 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I150946fe016d85cb378ed3d548eab5581321fbfe Gerrit-PatchSet: 12 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: 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