Gilad Chaplik has posted comments on this change.
Change subject: webadmin: When vnic's property become disabled again it should
be reseted
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseEditVmInterfaceModel.java
Line 83:
Line 84: @Override
Line 85: protected void initSelectedNetwork() {
Line 86: List<Network> networks = (List<Network>)
getNetwork().getItems();
Line 87: networks = networks == null ? new ArrayList<Network>() :
networks;
don't love it... prefer:
if(neworks == null){
networks = new....;
}
Line 88: for (Network a : networks)
Line 89: {
Line 90: String networkName = a == null ? null : a.getName();
Line 91: if (StringHelper.stringsEqual(networkName,
getNic().getNetworkName()))
Line 107: @Override
Line 108: protected void initSelectedType() {
Line 109: Integer selectedNicType = getNic().getType();
Line 110: ArrayList<VmInterfaceType> nicTypes =
(ArrayList<VmInterfaceType>) getNicType().getItems();
Line 111: nicTypes = nicTypes == null ? new
ArrayList<VmInterfaceType>() : nicTypes;
same, and you can return if nicTypes ==null;
Line 112:
Line 113: if (selectedNicType == null ||
!nicTypes.contains(VmInterfaceType.forValue(selectedNicType)))
Line 114: {
Line 115: selectedNicType =
AsyncDataProvider.GetDefaultNicType(getVm().getOs()).getValue();
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
Line 104:
Line 105: @Override
Line 106: protected void initLinked() {
Line 107: if (hotUpdateSupported) {
Line 108: getLinked().setEntity(true);
duplicate code, extract a getter to get isLinked (new vs. edit)
Line 109: } else {
Line 110: getLinked().setEntity(true);
Line 111: getLinked().setIsAvailable(false);
Line 112: }
--
To view, visit http://gerrit.ovirt.org/11930
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I39d70d8948f32e8e6f45f2d1eba5a3d26bb04975
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches