Lior Vernia has uploaded a new change for review. Change subject: webadmin: Modified model logic to support adding new bonds ......................................................................
webadmin: Modified model logic to support adding new bonds The model used to check that there were actually free bonds reported by the host; this is no longer necessary once we enable the user to add new bonds. Also, validity was never checked on bond creation, so this is now added. Change-Id: I7d3c2377ff9d95dfff1c3c416e7fc9242795e227 Signed-off-by: Lior Vernia <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java 1 file changed, 3 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/34/12534/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 0bcb307..8bb3f38 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 @@ -26,7 +26,6 @@ import org.ovirt.engine.ui.uicommonweb.BaseCommandTarget; import org.ovirt.engine.ui.uicommonweb.UICommand; import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider; -import org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel; import org.ovirt.engine.ui.uicommonweb.models.EntityModel; import org.ovirt.engine.ui.uicommonweb.models.Model; import org.ovirt.engine.ui.uicommonweb.models.SearchableListModel; @@ -434,14 +433,6 @@ bondPopup.getGateway().setIsAvailable(false); bondPopup.setBootProtocolAvailable(false); List<VdsNetworkInterface> freeBonds = getFreeBonds(); - if (freeBonds.isEmpty()) { - popupWindow = new ConfirmationModel(); - popupWindow.setTitle(ConstantsManager.getInstance().getConstants().errorTitle()); - popupWindow.setMessage(ConstantsManager.getInstance().getConstants().thereAreNoAvailableBondsMsg()); - popupWindow.getCommands().add(cancelCommand); - sourceListModel.setConfirmWindow(popupWindow); - return; - } bondPopup.getBond().setItems(freeBonds); Bond defaultChoice = new Bond(); @@ -452,6 +443,9 @@ @Override public void ExecuteCommand(UICommand command) { + if (!bondPopup.Validate()) { + return; + } sourceListModel.setConfirmWindow(null); VdsNetworkInterface bond = (VdsNetworkInterface) bondPopup.getBond().getSelectedItem(); setBondOptions(bond, bondPopup); -- To view, visit http://gerrit.ovirt.org/12534 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d3c2377ff9d95dfff1c3c416e7fc9242795e227 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
