Tomas Jelinek has posted comments on this change.

Change subject: frontend: created instance image widget
......................................................................


Patch Set 15:

(2 comments)

http://gerrit.ovirt.org/#/c/36063/15/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/instanceimages/InstanceImagesEditor.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/instanceimages/InstanceImagesEditor.java:

Line 41: 
Line 42:     @Override
Line 43:     protected InstanceImageLineModel createGhostValue() {
Line 44:         InstanceImageLineModel lineModel = new 
InstanceImageLineModel(model);
Line 45:         // the getVm() is null on new VM - that is handled inside the 
line models
> maybe you can pass the current vm name (if already entered) to the disk mod
good point - the suggestions were completely ignored.

Fixed by implementing this logic in the "InstanceImageLineModel". There was no 
need to pass the name from here - the InstanceImageLineModel has access to the 
UnitVmModel so it can get the actual value of the name directly.
Line 46:         lineModel.initialize(null, model.getVm());
Line 47:         return lineModel;
Line 48:     }
Line 49: 


http://gerrit.ovirt.org/#/c/36063/15/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/InstanceImageLineModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/InstanceImageLineModel.java:

Line 153:                 if (validate()) {
Line 154:                     flush();
Line 155:                     List<EntityModel<DiskModel>> selectedDisks = 
getSelectedDisks();
Line 156:                     if (selectedDisks.size() == 1) {
Line 157:                         // only 0 or 1 is allowed
> hmm, actually why is that? can we support multiple attach?
It would be confusing since this is a line based editor. One line represents 
one disk. You can add one disk by attaching it or by creating it, than you have 
that one line and you can delete it or edit it etc. If you want a second line, 
you add a second line. 

If we would support multiple, you would have one "ghost" widget and it would 
turn into more lines.
Line 158:                         
setDisk(selectedDisks.iterator().next().getEntity().getDisk());
Line 159:                     }
Line 160: 
Line 161:                     getDiskModel().setEntity(this);


-- 
To view, visit http://gerrit.ovirt.org/36063
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4bcaa1e40841aa12e64708ec82afdb9daec9fb7f
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@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

Reply via email to