Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Changed default created bond to comply with SuggestBox
......................................................................

webadmin: Changed default created bond to comply with SuggestBox

Since when performing a bonding action, the user may now create a
newly-named bond, it doesn't make much sense to choose one of the
existing free bonds by default. The solution is to put a "bond" prefix
as default, and let the user either proceed to add an arbitrary number
or choose one of the suggested existing bonds.

Change-Id: I6b68f6b5f89089a7f78609b78df2e3e92827234d
Signed-off-by: Lior Vernia <lver...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/33/12533/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
index 9eb6691..0bcb307 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
@@ -11,6 +11,7 @@
 import org.ovirt.engine.core.common.action.VdcActionType;
 import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.businessentities.VDS;
+import org.ovirt.engine.core.common.businessentities.network.Bond;
 import org.ovirt.engine.core.common.businessentities.network.Network;
 import 
org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol;
 import 
org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface;
@@ -38,6 +39,7 @@
 import 
org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationFactory;
 import 
org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationFactory.OperationMap;
 import 
org.ovirt.engine.ui.uicommonweb.models.hosts.network.OperationCadidateEventArgs;
+import org.ovirt.engine.ui.uicommonweb.validation.BondNameValidation;
 import org.ovirt.engine.ui.uicompat.ConstantsManager;
 import org.ovirt.engine.ui.uicompat.Event;
 import org.ovirt.engine.ui.uicompat.EventArgs;
@@ -441,6 +443,11 @@
                 return;
             }
             bondPopup.getBond().setItems(freeBonds);
+
+            Bond defaultChoice = new Bond();
+            defaultChoice.setName(BondNameValidation.BOND_PREFIX);
+            bondPopup.getBond().setSelectedItem(defaultChoice);
+
             bondPopup.getCommands().add(new UICommand("OK", new 
BaseCommandTarget() { //$NON-NLS-1$
 
                         @Override


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b68f6b5f89089a7f78609b78df2e3e92827234d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to