Mike Kolesnik has posted comments on this change.
Change subject: webadmin: Add external subnets sub tab
......................................................................
Patch Set 1:
(13 comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
Line 1179: return retVal == 0 ?
lexoNumeric.compare(vnicProfile1.getName(), vnicProfile2.getName()) : retVal;
Line 1180: }
Line 1181: }
Line 1182:
Line 1183: public final static class ExternalSubnetComparator implements
Comparator<ExternalSubnet>, Serializable {
Done
Line 1184: private static final long serialVersionUID =
4987035011384708563L;
Line 1185: private LexoNumericComparator comparator = new
LexoNumericComparator();
Line 1186:
Line 1187: @Override
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
Line 3428: }
Line 3429:
Frontend.getInstance().runQuery(VdcQueryType.GetVnicProfilesByDataCenterId, new
IdQueryParameters(dcId), aQuery);
Line 3430: }
Line 3431:
Line 3432: public static void getExternalSubnetsByNetworkId(AsyncQuery
aQuery, Guid networkId) {
Done
Line 3433: aQuery.converterCallback = new IAsyncConverter() {
Line 3434: @Override
Line 3435: public Object Convert(Object source, AsyncQuery
_asyncQuery)
Line 3436: {
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkExternalSubnetListModel.java
Line 12: import org.ovirt.engine.ui.uicommonweb.models.SearchableListModel;
Line 13: import org.ovirt.engine.ui.uicompat.ConstantsManager;
Line 14: import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
Line 15:
Line 16: @SuppressWarnings("rawtypes")
Done
Line 17: public class NetworkExternalSubnetListModel extends SearchableListModel
Line 18: {
Line 19:
Line 20: public NetworkExternalSubnetListModel() {
Line 17: public class NetworkExternalSubnetListModel extends SearchableListModel
Line 18: {
Line 19:
Line 20: public NetworkExternalSubnetListModel() {
Line 21:
setTitle(ConstantsManager.getInstance().getConstants().externalSubnetsTitle());
Done
Line 22: setHashName("external_subnets"); //$NON-NLS-1$
Line 23: }
Line 24:
Line 25:
Line 24:
Line 25:
Line 26: @Override
Line 27: public NetworkView getEntity() {
Line 28: return (NetworkView) ((super.getEntity() instanceof
NetworkView) ? super.getEntity() : null);
Done. It was "inspiration" from NetworkProfileListModel
Line 29: }
Line 30:
Line 31: @SuppressWarnings("unchecked")
Line 32: public void setEntity(NetworkView value) {
Line 28: return (NetworkView) ((super.getEntity() instanceof
NetworkView) ? super.getEntity() : null);
Line 29: }
Line 30:
Line 31: @SuppressWarnings("unchecked")
Line 32: public void setEntity(NetworkView value) {
Done. Again, "inspiration" from NetworkProfileListModel
Line 33: super.setEntity(value);
Line 34: }
Line 35:
Line 36: @Override
Line 42: }
Line 43: }
Line 44:
Line 45: @Override
Line 46: public void search() {
Done. You already know what "inspired" this..
Line 47: if (getEntity() != null) {
Line 48: super.search();
Line 49: }
Line 50: }
Line 63: public void onSuccess(Object model, Object returnValue) {
Line 64:
NetworkExternalSubnetListModel.this.setItems((List<ExternalSubnet>)
returnValue);
Line 65: }
Line 66: };
Line 67: AsyncDataProvider.getExternalSubnetsByNetworkId(asyncQuery,
getEntity().getId());
Done
Line 68: }
Line 69:
Line 70: @Override
Line 71: protected void entityPropertyChanged(Object sender,
PropertyChangedEventArgs e) {
Line 70: @Override
Line 71: protected void entityPropertyChanged(Object sender,
PropertyChangedEventArgs e) {
Line 72: super.entityPropertyChanged(sender, e);
Line 73:
Line 74: if (e.PropertyName.equals("name")) { //$NON-NLS-1$
Done, Although this appears in almost all other Network*ListModel classes so it
should probably be removed from them as well (not in this patch obviously)..
Line 75: getSearchCommand().execute();
Line 76: }
Line 77: }
Line 78:
Line 77: }
Line 78:
Line 79: @Override
Line 80: @SuppressWarnings("unchecked")
Line 81: public void setItems(Iterable value) {
Done
Line 82: if (value != null) {
Line 83: Collections.sort((List<ExternalSubnet>) value, new
Linq.ExternalSubnetComparator());
Line 84: }
Line 85: super.setItems(value);
Line 79: @Override
Line 80: @SuppressWarnings("unchecked")
Line 81: public void setItems(Iterable value) {
Line 82: if (value != null) {
Line 83: Collections.sort((List<ExternalSubnet>) value, new
Linq.ExternalSubnetComparator());
Done
Line 84: }
Line 85: super.setItems(value);
Line 86: }
Line 87:
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkListModel.java
Line 187:
Line 188: @Override
Line 189: protected void updateDetailsAvailability() {
Line 190: super.updateDetailsAvailability();
Line 191: NetworkView network = (NetworkView) getSelectedItem();
Done
Line 192:
networkExternalSubnetListModel.setIsAvailable(network.isExternal());
Line 193: }
Line 194:
Line 195: @Override
....................................................
File
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
Line 463: @DefaultStringValue("VNIC Profiles")
Line 464: String vnicProfilesTitle();
Line 465:
Line 466: @DefaultStringValue("External Subnets")
Line 467: String externalSubnetsTitle();
Done
Line 468:
Line 469: @DefaultStringValue("VMs")
Line 470: String vmsTitle();
Line 471:
--
To view, visit http://gerrit.ovirt.org/22685
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec596959194be4db091a1676b70a29f90f86579
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[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