Tomas Jelinek has posted comments on this change.

Change subject: webadmin: Show migrating VM on destination host
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
Line 1924:     public static void GetVmsRunningOnOrMigratingToVds(AsyncQuery 
aQuery, Guid id) {
Line 1925:         aQuery.converterCallback = new IAsyncConverter() {
Line 1926:             @Override
Line 1927:             public Object Convert(Object source, AsyncQuery 
_asyncQuery)
Line 1928:             {
this convert should do some logic (e.g. if the source is null than return emtpy 
list or something like this). Here it would be enough just to "return source;" 
or have no converter at all.
Line 1929:                 ArrayList<VM> vms = (ArrayList<VM>) source;
Line 1930:                 return vms;
Line 1931:             }
Line 1932:         };


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostVmListModel.java
Line 53:             AsyncDataProvider.GetVmsRunningOnOrMigratingToVds(new 
AsyncQuery(this, new INewAsyncCallback() {
Line 54:                 @Override
Line 55:                 public void OnSuccess(Object target, Object 
returnValue) {
Line 56:                     @SuppressWarnings("unchecked")
Line 57:                     ArrayList<VM> list = (ArrayList<VM>) returnValue;
is there a chance that the returnValue is null? if yes, the converter would be 
a perfect place to handle it...
Line 58:                     HostVmListModel model = (HostVmListModel) target;
Line 59:                     model.setItems(list);
Line 60:                 }
Line 61:             }), getEntity().getId());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae8228e4a6e9e7e91b8224f0ef2764c5e4e25cfa
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Libor Spevak <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Libor Spevak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to