Alona Kaplan has posted comments on this change.
Change subject: webadmin: Added Import command to Networks main tab
......................................................................
Patch Set 5: (2 inline comments)
The name discover is not good any more...
The model can be called ImportProviderNetworksModel.
The view can be called ImportNetworksPopupView.
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/ImportNetworksModel.java
Line 78: @Override
Line 79: public void eventRaised(Event ev, Object sender, EventArgs
args) {
Line 80: onProviderChosen();
Line 81: }
Line 82: });
I think start progress should be here and not in onProviderChosen().
Line 83: AsyncDataProvider.GetAllProviders(new AsyncQuery(this, new
INewAsyncCallback() {
Line 84:
Line 85: @SuppressWarnings("unchecked")
Line 86: @Override
Line 86: @Override
Line 87: public void onSuccess(Object model, Object returnValue) {
Line 88: List<Provider> providers =
Linq.toList(Linq.filterNetworkProviders((Iterable<Provider>) returnValue));
Line 89: providers.add(0, null);
Line 90: Provider selectedProvider = (Provider)
getProviders().getSelectedItem();
As I understand you need the selection code in order to avoid clear of the
selection in the DiscoverModel which inherits this model.
But whole this query is redundant for the discover. You know what is the
provider and it
is not changeable. You don't need the provider list.
I think you should have abstract class with the common code and the Import and
discover should extend it.
Or alternatively you can set the providers via the source list model, like it
is done for the dcs in the networks model.
Line 91: getProviders().setItems(providers);
Line 92: getProviders().setSelectedItem(selectedProvider);
Line 93: }
Line 94: }));
--
To view, visit http://gerrit.ovirt.org/16070
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c84085e19576f6d7de98bccfaf30dc5b70a9621
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches