Kanagaraj M has posted comments on this change. Change subject: gluster: UI to set the volume snapshot configurations ......................................................................
Patch Set 3: (3 comments) http://gerrit.ovirt.org/#/c/36295/3/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeSnapshotConfigModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeSnapshotConfigModel.java: Line 1: package org.ovirt.engine.ui.uicommonweb.models.gluster; Line 2: Line 3: import java.io.Serializable; Line 4: Line 5: public class VolumeSnapshotConfigModel implements Serializable { You can use the GlusterVolumeSnapshotConfig entity itself instead of a new one Line 6: private static final long serialVersionUID = 1L; Line 7: Line 8: private String optionName; Line 9: private String optionValue; http://gerrit.ovirt.org/#/c/36295/3/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 1270: Line 1271: for (EntityModel<VolumeSnapshotConfigModel> clusterCfg : snapshotConfigModel.getClusterConfigOptions() Line 1272: .getItems()) { Line 1273: if (!(clusterCfg.getEntity().getOptionValue().equals(((GlusterVolumeSnapshotConfigModel) getWindow()).getExistingClusterConfigValue(clusterCfg.getEntity() Line 1274: .getOptionName())))) { Instead of getWindow(), you can use snapshotConfigModel Line 1275: clusterCfgChanged = true; Line 1276: break; Line 1277: } Line 1278: } Line 1325: clusterCfg.getEntity().getOptionValue())); Line 1326: } Line 1327: GlusterVolumeEntity volumeEntity = Line 1328: (getSelectedItems() == null || getSelectedItems().size() == 0) ? null Line 1329: : (GlusterVolumeEntity) getSelectedItems().get(0); you could just check snapshotConfigModel.getVolume().getEntity() != null Line 1330: if (volumeEntity != null) { Line 1331: for (EntityModel<VolumeSnapshotConfigModel> volumeCfg : snapshotConfigModel.getVolumeConfigOptions() Line 1332: .getItems()) { Line 1333: vdsParams.add(new GlusterVolumeSnapshotConfig(snapshotConfigModel.getClusters() -- To view, visit http://gerrit.ovirt.org/36295 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08b5e592b818266106bc1891c3aa2f3ba3541d36 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> Gerrit-Reviewer: anmolbabu <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
