Tomer Saban has posted comments on this change. Change subject: webadmin: Changed the new storage popup ......................................................................
Patch Set 5: (5 comments) Fixed on next commit http://gerrit.ovirt.org/#/c/36115/5/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/qos/StorageQosMetricParametersModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/qos/StorageQosMetricParametersModel.java: Line 38: getChoiceGroupNone().getEntityChangedEvent().addListener(this); Line 39: getChoiceGroupTotal().getEntityChangedEvent().addListener(this); Line 40: getChoiceGroupReadWrite().getEntityChangedEvent().addListener(this); Line 41: Line 42: getPropertyChangedEvent().addListener(this); > not sure it's needed, you just registered the 3 events. Done Line 43: Line 44: } Line 45: Line 46: public EntityModel<Integer> getTotal() { Line 81: Line 82: Line 83: public void setChoiceGroupNone(EntityModel<Boolean> choice_group_none) { this.choiceGroupNone = choice_group_none; } Line 84: public void setChoiceGroupTotal(EntityModel<Boolean> choice_group_total) { this.choiceGroupTotal = choice_group_total; } Line 85: public void setChoiceGroupReadWrite(EntityModel<Boolean> choice_group_read_write) { this.choiceGroupReadWrite = choice_group_read_write; } > use standard/common code style. Done Line 86: Line 87: public boolean validate() { Line 88: if(getChoiceGroupNone().getEntity() && !getChoiceGroupTotal().getEntity() && !getChoiceGroupReadWrite().getEntity() ) { Line 89: return true; Line 84: public void setChoiceGroupTotal(EntityModel<Boolean> choice_group_total) { this.choiceGroupTotal = choice_group_total; } Line 85: public void setChoiceGroupReadWrite(EntityModel<Boolean> choice_group_read_write) { this.choiceGroupReadWrite = choice_group_read_write; } Line 86: Line 87: public boolean validate() { Line 88: if(getChoiceGroupNone().getEntity() && !getChoiceGroupTotal().getEntity() && !getChoiceGroupReadWrite().getEntity() ) { > you can check only for none.. Done Line 89: return true; Line 90: } Line 91: Line 92: validateValue(getTotal(), (Integer) AsyncDataProvider.getInstance().getConfigValuePreConverted(maxTotal)); Line 125: getChoiceGroupNone().setIsChangable(getIsChangable()); Line 126: getChoiceGroupTotal().setIsChangable(getIsChangable()); Line 127: getChoiceGroupReadWrite().setIsChangable(getIsChangable()); Line 128: } Line 129: else if (((EntityModel) sender).getEntity() == Boolean.TRUE) { > add instanceof check before casting, just in case. Done Line 130: if (!getChoiceGroupNone().equals(sender)) { Line 131: getChoiceGroupNone().setEntity(false); Line 132: } Line 133: http://gerrit.ovirt.org/#/c/36115/5/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/qos/StorageQosParametersModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/qos/StorageQosParametersModel.java: Line 45: getThroughput().getRead().setEntity(qos.getMaxReadThroughput()); Line 46: getThroughput().getWrite().setEntity(qos.getMaxWriteThroughput()); Line 47: getThroughput().getChoiceGroupNone().setEntity(true); Line 48: getThroughput().getChoiceGroupTotal().setEntity(false); Line 49: getThroughput().getChoiceGroupReadWrite().setEntity(false); > can be exacted outside of the if (same for if and else). Done Line 50: } Line 51: Line 52: if (qos.getMaxIops() == null Line 53: && qos.getMaxReadIops() == null -- To view, visit http://gerrit.ovirt.org/36115 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia294f95e13440456798600c34eca392c0213d3e7 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomer Saban <tsa...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Tomer Saban <tsa...@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