Bug 740763 - [webadmin] Implement uicompat UriValidator
Summary: [webadmin] Implement uicompat UriValidator
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: m2
: ---
Assignee: Einav Cohen
QA Contact:
URL:
Whiteboard: ux
: 744568 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-23 09:41 UTC by Vojtech Szocs
Modified: 2012-05-17 13:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-17 13:50:52 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Vojtech Szocs 2011-09-23 09:41:19 UTC
Implement validation logic for org.ovirt.engine.ui.uicompat.UriValidator
  
Actual results:
UriValidator IsValid() method currently always returns true.

Expected results:
UriValidator IsValid() method should return true only for valid URIs. The method should not throw any exceptions.

Additional info:
http://stackoverflow.com/questions/2098750/regex-in-gwt-to-match-urls

Comment 1 Einav Cohen 2011-10-09 14:42:01 UTC
*** Bug 744568 has been marked as a duplicate of this bug. ***

Comment 2 Asaf Shakarchi 2011-10-10 01:37:43 UTC
This is a bit harder in client (GWT) code and cannot use the same approach used by backend in ValidationUtils class as URI is not a JRE enumated class,

Probably best approach is to implement by GWT RegExp.

Comment 3 Vojtech Szocs 2011-10-21 15:01:22 UTC
I see two options here,
1) use JSNI - native JS regexp support, or
2) use GWT com.google.gwt.regexp.shared.RegExp

Comment 4 Gilad Chaplik 2011-10-30 15:08:44 UTC
Take a look in the java URI code, and it seems to be native code (some string manipulation) that does the validation. maybe we can copy that code to a static util method and invoke it, to match the backend.

Comment 5 Itamar Heim 2012-05-17 09:06:21 UTC
still relevant?

Comment 6 Vojtech Szocs 2012-05-17 09:39:59 UTC
I think this is not relevant anymore.

uicompat's org.ovirt.engine.ui.uicompat.UriValidator is only used in uicommon's HostAddressValidation. Since UriValidator isn't implemented yet (always returns true), uicommon's HostAddressValidation doesn't really do any kind of validation.

On the other hand, in uicommonWEB, HostAddressValidation has been modified not to use UriValidator, and implements host address (IP or fully-qualified-domain-name) validation on its own.

Since both WebAdmin and new UserPortal use uicommonWEB, I guess we can close this ticket. [uicompat's UriValidator is only used by legacy UserPortal which isn't part of the build anymore]

Comment 7 Vojtech Szocs 2012-05-17 13:50:52 UTC
Closing this ticket as uicompat's UriValidator class is not used in uicommonweb, and therefore not used in WebAdmin & new UserPortal.

(it's used only in old UserPortal through uicommon dependency)

In WebAdmin & new UserPortal, UriValidator functionality is implemented directly in uicommonweb's HostAddressValidation.


Note You need to log in before you can comment on or make changes to this bug.