Mike Kolesnik has posted comments on this change.
Change subject: webadmin: Added remove external subnet capability
......................................................................
Patch Set 1:
(8 comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkExternalSubnetListModel.java
Line 16: import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
Line 17:
Line 18: @SuppressWarnings("rawtypes")
Line 19: public class NetworkExternalSubnetListModel extends SearchableListModel
Line 20: {
Please provide a reference to the styling guide of UI code in the project as I
couldn't find any.
I simply followed the style which is the majority in classes extending
SearchableListModel.
Line 21:
Line 22: private UICommand removeCommand;
Line 23:
Line 24: public NetworkExternalSubnetListModel() {
Line 47: RemoveExternalSubnetModel model = new
RemoveExternalSubnetModel(this, getSelectedItems());
Line 48: setWindow(model);
Line 49: }
Line 50:
Line 51: public void cancel() {
Done
Line 52: setWindow(null);
Line 53: }
Line 54:
Line 55: @Override
Line 136:
Line 137: if (command == getRemoveCommand()) {
Line 138: remove();
Line 139: }
Line 140: else if ("Cancel".equals(command.getName())) { //$NON-NLS-1$
Done
Line 141: cancel();
Line 142: }
Line 143: }
Line 144:
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RemoveExternalSubnetModel.java
Line 28: this.subnets = subnets;
Line 29:
Line 30: ArrayList<String> items = new ArrayList<String>();
Line 31: for (ExternalSubnet subnet : subnets)
Line 32: {
Done
Line 33: items.add(subnet.getName());
Line 34: }
Line 35: setItems(items);
Line 36:
Line 45: }
Line 46:
Line 47: private void onRemove()
Line 48: {
Line 49: if (getProgress() != null)
Done
Line 50: {
Line 51: return;
Line 52: }
Line 53:
Line 73: },
Line 74: null);
Line 75: }
Line 76:
Line 77: public List<ExternalSubnet> getSubnets() {
Done
Line 78: return subnets;
Line 79: }
Line 80:
Line 81: private void cancel()
Line 80:
Line 81: private void cancel()
Line 82: {
Line 83: sourceListModel.setWindow(null);
Line 84: sourceListModel.setConfirmWindow(null);
Done
Line 85: sourceListModel.getSearchCommand().execute();
Line 86: }
Line 87:
Line 88: @Override
Line 81: private void cancel()
Line 82: {
Line 83: sourceListModel.setWindow(null);
Line 84: sourceListModel.setConfirmWindow(null);
Line 85: sourceListModel.getSearchCommand().execute();
Done
Line 86: }
Line 87:
Line 88: @Override
Line 89: public void executeCommand(UICommand command)
--
To view, visit http://gerrit.ovirt.org/22687
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib389ef5b94ee2176f4cf019540663cda3d337bd0
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