This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 795833 - Search bar is broken after gwt upgrade
Search bar is broken after gwt upgrade
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI, SearchBar (Show other bugs)
4.3
All All
urgent Severity urgent (vote)
: ---
: RHQ 4.3.0
Assigned To: Mike Thompson
Mike Foley
:
Depends On:
Blocks: rhq-uxd
  Show dependency treegraph
 
Reported: 2012-02-21 10:53 EST by Jay Shaughnessy
Modified: 2013-09-01 06:07 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-01 06:07:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jay Shaughnessy 2012-02-21 10:53:41 EST
Navigate to a resource search view such as:
  
  Inventory -> Services

1) The search bar is now on the bottom, it should be at the top.

2) It is not recognizing [carriage] returns.

Since CR is seemingly ignored the search filter can not be applied.
Similarly, you can't create a saved search.
Comment 1 Mike Foley 2012-02-21 10:57:17 EST
capturing the need to add UI automation on this JON QE Task Tracker ticket

https://engineering.redhat.com/trac/jon/ticket/34
Comment 2 Mike Thompson 2012-02-24 10:20:06 EST
Issues 1 and 2 have been resolved. However, we now have issues with criteria mangling in web mode and not dev mode.

After having fixed the enter key not working and the star, arrow and patternField, the next issue is that is appears that the Criteria is injecting some weird javascript to the domain that cause the search to come back erroneous.


Scenario:
	From Inventory -> Services type do a search for 'version' in the search bar.

We will run the same scenario through both 'Dev mode' and then 'Web mode (compiled)'

This is the Dev Mode Logging

Thu Feb 23 13:13:09 PST 2012 FINE: Table.TableFilter Pressed Enter key2
Thu Feb 23 13:13:09 PST 2012 FINE: Table.TableFilter searchBarValue : version, hiddenValue:
Thu Feb 23 13:13:09 PST 2012 FINE: Table.TableFilter fetchFilteredTableData
Thu Feb 23 13:13:09 PST 2012 FINE: In Table.refresh()
Thu Feb 23 13:13:09 PST 2012 FINE: org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView.refresh() using criteria [Criteria[{search=version, resourceType.category=SERVICE}]]...
Thu Feb 23 13:13:09 PST 2012 FINE: Table.refresh dataSource != null
Thu Feb 23 13:13:09 PST 2012 FINE: Resetting paging on org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDatasource...
Thu Feb 23 13:13:09 PST 2012 FINE: Array filter: resourceType.category=[[Service]]
Thu Feb 23 13:13:09 PST 2012 FINE: Filter: search=[version]
Thu Feb 23 13:13:09 PST 2012 FINE: org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDatasource using [PageControl[firstRow=0, size=50]] for fetch request.
Thu Feb 23 13:13:09 PST 2012 FINE: RPC method invocation: ResourceGWTService_Proxy.findResourcesByCriteria
Thu Feb 23 13:13:09 PST 2012 FINE: RPCTracker register: TrackingRequestCallback[id=28, name=ResourceGWTService_Proxy.findResourcesByCriteria, age=0]
Thu Feb 23 13:13:09 PST 2012 FINE: SessionRpcRequestBuilder is adding sessionId(-1961737963) to request(http://192.168.1.3:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/ResourceGWTService)
POST http://192.168.1.3:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/ResourceGWTService
	
200 OK
		118ms	
(line 42)
Thu Feb 23 13:13:09 PST 2012 FINE: Table.refresh markForRedraw()
Thu Feb 23 13:13:09 PST 2012 FINE: ****** Pressed Enter in SearchBar
Thu Feb 23 13:13:09 PST 2012 FINE: Table.TableFilter Pressed Enter key2
Thu Feb 23 13:13:09 PST 2012 FINE: Table.TableFilter searchBarValue : version, hiddenValue: version
Thu Feb 23 13:13:09 PST 2012 FINE: OnValueChange in SearchBar: version
Thu Feb 23 13:13:09 PST 2012 INFO: Loading [2] types with facets=[[]]...
Thu Feb 23 13:13:09 PST 2012 FINE: RPC method invocation: ResourceTypeGWTService_Proxy.findResourceTypesByCriteria
Thu Feb 23 13:13:09 PST 2012 FINE: RPCTracker register: TrackingRequestCallback[id=29, name=ResourceTypeGWTService_Proxy.findResourceTypesByCriteria, age=0]
Thu Feb 23 13:13:09 PST 2012 FINE: SessionRpcRequestBuilder is adding sessionId(-1961737963) to request(http://192.168.1.3:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/ResourceTypeGWTService)
POST http://192.168.1.3:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/ResourceTypeGWTService
	
200 OK		38ms

As you can see Dev Mode completes without error.

Now, we run the same search in 'Web mode'.


This is the web mode logging

Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.TableFilter Pressed Enter key2
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.TableFilter searchBarValue : version, hiddenValue: ejb
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.TableFilter fetchFilteredTableData
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: In Table.refresh()
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView.refresh() using criteria [Criteria[{search={0=v, 1=e, 2=r, 3=s, 4=i, 5=o, 6=n, cT=function Bpd(a) { return Pod(this, VL(a, 1)); }, eQ=function Cpd(a) { return Tod(this, a); }, gC=function Fpd() { return WW; }, hC=function Gpd() { return Wod(this); }, tS=function Hpd() { return qpd(this); }, cM={1=1, 628=1, 636=1, 641=1}}, resourceType.category=SERVICE}]]...
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.refresh dataSource != null
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Array filter: resourceType.category=[[Service]]
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Filter: search=[{0=v, 1=e, 2=r, 3=s, 4=i, 5=o, 6=n, cT=function Bpd(a) { return Pod(this, VL(a, 1)); }, eQ=function Cpd(a) { return Tod(this, a); }, gC=function Fpd() { return WW; }, hC=function Gpd() { return Wod(this); }, tS=function Hpd() { return qpd(this); }, cM={1=1, 628=1, 636=1, 641=1}}]
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDatasource using [PageControl[firstRow=0, size=50]] for fetch request.
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: RPC method invocation: ResourceGWTService_Proxy.findResourcesByCriteria
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: RPCTracker register: TrackingRequestCallback[id=22, name=ResourceGWTService_Proxy.findResourcesByCriteria, age=0]
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: SessionRpcRequestBuilder is adding sessionId(-1961737963) to request(http://192.168.1.3:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/ResourceGWTService)
B5209B...he.html (line 1484)
POST http://192.168.1.3:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/ResourceGWTService
	
200 OK	91ms	
B5209B...he.html (line 2854)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.refresh markForRedraw()
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: ****** Pressed Enter in SearchBar
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.TableFilter Pressed Enter key2
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: Table.TableFilter searchBarValue : version, hiddenValue: version
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: OnValueChange in SearchBar: version
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 SEVERE: At [Thu Feb 23 13:00:44 GMT-800 2012] MessageCenter received: Invalid search expression.
B5209B...he.html (line 1484)
Thu Feb 23 13:00:44 GMT-800 2012 FINE: In Table.refresh()



You can see that the criteria built are incorrect with the weird javascript stuff injected into it; and this only occurs in web mode.
Comment 3 John Sanda 2012-02-24 10:37:12 EST
I have committed a fix for the search criteria getting mangled in the BZ795833 branch. After lots of debugging it turned out to be a very minor change. The search expression comes from FlexSearchBar.getValue which was,

    return autoCompletePatternField.getValue(); 

and I changed it to,

    return autoCompletePatternField.getText();

With this change, we now get the entered text. 

commit hash: 4710b068f3bd9f6a37485d2cea2976d30193d887
Comment 4 Mike Thompson 2012-02-24 13:25:00 EST
Merged into master.

Commit: 5fdba59819810c5ae5cd76f7132cc8fc866ee722
Comment 5 Heiko W. Rupp 2013-09-01 06:07:49 EDT
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.

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