Lior Vernia has uploaded a new change for review. Change subject: webadmin: Added host interface label character validation ......................................................................
webadmin: Added host interface label character validation Previously the characters input into a newly-assigned label were only validated by the backend, now the dialog checks that no illegal characters were entered as well. Change-Id: I25bef382cb658e6e78bf5e2e0cfd1a273280d953 Bug-Url: https://bugzilla.redhat.com/1063846 Signed-off-by: Lior Vernia <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/14/25014/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java index ee1b98d..65f31bc 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java @@ -9,6 +9,8 @@ import org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface; import org.ovirt.engine.ui.uicommonweb.models.ListModel; +import org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation; +import org.ovirt.engine.ui.uicommonweb.validation.IValidation; import org.ovirt.engine.ui.uicompat.ConstantsManager; public class NicLabelModel extends ListModel<ListModel<String>> { @@ -57,6 +59,8 @@ public boolean validate() { boolean res = true; for (ListModel<String> labelModel : getItems()) { + labelModel.validateSelectedItem(new IValidation[] { new AsciiNameValidation() }); + String label = labelModel.getSelectedItem(); String usingIface = labelToIface.get(label); if (usingIface != null && !containedIfaces.contains(usingIface)) { -- To view, visit http://gerrit.ovirt.org/25014 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25bef382cb658e6e78bf5e2e0cfd1a273280d953 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
