Daniel Erez has posted comments on this change.
Change subject: core, webadmin: Show only supported disk interfaces
......................................................................
Patch Set 2:
(4 comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/AbstractDiskModel.java
Line 503: volumeType_SelectedItemChanged();
Line 504: }
Line 505:
Line 506: public void updateInterface(int osId, Version clusterVersion,
AsyncQuery chainedAsyncQuery) {
Line 507: final INewAsyncCallback chainedCallback =
chainedAsyncQuery.asyncCallback;
we usually don't pass queries, what do you need it for?
Line 508:
Line 509: if (clusterVersion == null) {
Line 510: ArrayList<DiskInterface> diskInterfaces =
AsyncDataProvider.getDiskInterfaceList();
Line 511: getDiskInterface().setItems(diskInterfaces);
Line 505:
Line 506: public void updateInterface(int osId, Version clusterVersion,
AsyncQuery chainedAsyncQuery) {
Line 507: final INewAsyncCallback chainedCallback =
chainedAsyncQuery.asyncCallback;
Line 508:
Line 509: if (clusterVersion == null) {
shouldn't happen, I think we can just early return in this case...
Line 510: ArrayList<DiskInterface> diskInterfaces =
AsyncDataProvider.getDiskInterfaceList();
Line 511: getDiskInterface().setItems(diskInterfaces);
Line 512: chainedCallback.onSuccess(this, null);
Line 513: } else {
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
Line 102:
getDiskInterface().setSelectedItem(getDisk().getDiskInterface());
Line 103: }
Line 104: };
Line 105:
Line 106: updateInterface(osId, clusterVersion, asyncQuery);
Instead of passing a query, just call 'updateInterface' from onSuccess() scope
(in the AbstractDiskModel method).
I.e. remove query's declaration and usage in the concrete methods.
Line 107: }
Line 108:
Line 109: @Override
Line 110: protected DiskImage getDiskImage() {
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java
Line 135: }
Line 136:
Line 137: @Override
Line 138: public void updateInterface(int osId, Version clusterVersion) {
Line 139: AsyncQuery asyncQuery = new AsyncQuery();
same
Line 140: asyncQuery.asyncCallback = new INewAsyncCallback() {
Line 141: @Override
Line 142: public void onSuccess(Object model, Object returnValue) {
Line 143:
getDiskInterface().setSelectedItem(DiskInterface.VirtIO);
--
To view, visit http://gerrit.ovirt.org/17964
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2b674a3481b3e7503b3a224fdda0f9071b9a0619
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa
<[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[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