Ravi Nori has uploaded a new change for review. Change subject: webadmin: When adding a host, the ip is not ignoring spaces ......................................................................
webadmin: When adding a host, the ip is not ignoring spaces Ignore spaces entered in ip address field while adding host. Change-Id: I796a6d3a2729cd9d80a4a928af18d84058cd0c15 Bug-Url: https://bugzilla.redhat.com/1177119 Signed-off-by: Ravi Nori <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/HostAddressValidation.java 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/39582/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java index 5ba51d7..c22ed50 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java @@ -955,7 +955,7 @@ // Save changes. host.setVdsName(model.getName().getEntity()); host.setComment(model.getComment().getEntity()); - host.setHostName(model.getHost().getEntity()); + host.setHostName(model.getHost().getEntity().trim()); host.setPort(Integer.parseInt(model.getPort().getEntity().toString())); host.setProtocol(VdsProtocol.fromValue(model.getProtocol().getEntity() ? VdsProtocol.STOMP.toString() : VdsProtocol.XML.toString())); host.setSshPort(Integer.parseInt(model.getAuthSshPort().getEntity().toString())); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/HostAddressValidation.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/HostAddressValidation.java index e71536e..458dea1 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/HostAddressValidation.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/HostAddressValidation.java @@ -19,7 +19,7 @@ if (acceptEmptyInput && (value == null || (value instanceof String && value.equals("")))) { return new ValidationResult(); } - return super.validate(value); + return super.validate(value instanceof String ? ((String) value).trim() : value); } @Override -- To view, visit https://gerrit.ovirt.org/39582 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I796a6d3a2729cd9d80a4a928af18d84058cd0c15 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
