Bug 1081028 - [RFE] Provide UI plugin API to control the search string
Summary: [RFE] Provide UI plugin API to control the search string
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Vojtech Szocs
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-26 14:04 UTC by Vojtech Szocs
Modified: 2016-02-10 12:52 UTC (History)
10 users (show)

Fixed In Version: ovirt-3.6.0-alpha1.2
Clone Of:
Environment:
Last Closed: 2016-02-10 12:52:45 UTC
oVirt Team: UX
Embargoed:
rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
Test UI plugin (610 bytes, application/x-gzip)
2015-04-30 18:34 UTC, Vojtech Szocs
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 40405 0 master MERGED webadmin: UI plugin API - setSearchString Never
oVirt gerrit 41030 0 ovirt-engine-3.5-gluster MERGED webadmin: UI plugin API - setSearchString Never

Description Vojtech Szocs 2014-03-26 14:04:06 UTC
WebAdmin's search panel can be used to query different kinds of objects, with UI adapting its view to objects being queried.

This RFE is about controlling the search string via URL parameter, for example:

  WebAdmin.html#search;q={uri-encoded-search-string}

GWT(P) UI infra could handle this URL simply by applying the search string into the search panel, which in turn redirects the URL to appropriate place (based on object type being searched) like #vms or #hosts.

This kind of URL would also work with auto-login, i.e. if Engine user session exists, WebAdmin UI takes user into the main section and applies the search string.

The advantage would be that users could simply bookmark popular search strings via URL in their browser.

Comment 1 Sven Kieske 2014-03-26 14:54:31 UTC
(In reply to vszocs from comment #0)
> GWT(P) UI infra could handle this URL simply by applying the search string
> into the search panel

well you should parse it for allowed searches.
so it's not that simple, at least if you want a secure search ;)

Comment 2 Vojtech Szocs 2014-03-26 15:08:36 UTC
> well you should parse it for allowed searches.
> so it's not that simple, at least if you want a secure search ;)

Good point, however the search is just a string (text) that's meant to be placed in WebAdmin's search panel text-box (input element), i.e. same as if you entered such text into the search panel by hand. This text will not evaluate as JS, so XSS shouldn't be involved.

I agree that we could do some validation here, i.e. check search string sytax (among other things).

Comment 3 Itamar Heim 2015-03-29 09:06:06 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.

Comment 4 Pavel Stehlik 2015-04-02 17:29:14 UTC
User experience improvement, reopening.

Comment 5 Einav Cohen 2015-04-30 12:13:36 UTC
Vojtech - status should be POST?

Comment 6 Einav Cohen 2015-04-30 12:15:09 UTC
(In reply to Einav Cohen from comment #5)
> Vojtech - status should be POST?

Also: subject should change to something like "provide a UI Plugins API method for setting the search string"?

Comment 7 Vojtech Szocs 2015-04-30 18:30:57 UTC
(In reply to Einav Cohen from comment #5)
> Vojtech - status should be POST?

Indeed, setting to POST.(In reply to Einav Cohen from comment #6)

> Also: subject should change to something like "provide a UI Plugins API
> method for setting the search string"?

Will change the BZ summary accordingly.

Comment 8 Vojtech Szocs 2015-04-30 18:34:38 UTC
Created attachment 1020709 [details]
Test UI plugin

Comment 9 Vojtech Szocs 2015-04-30 18:36:08 UTC
Attached test UI plugin (ui-plugins_1081028.tar.gz) to demonstrate the use of new "setSearchString" API.

Comment 10 Vojtech Szocs 2015-04-30 18:42:37 UTC
Associated upstream patch http://gerrit.ovirt.org/#/c/40405 is verified and ready for merge.

Comment 11 Vojtech Szocs 2015-04-30 18:50:23 UTC
Forgot to mention: scope of this RFE has been narrowed down from "search string controlled via WebAdmin URL" to "search string controlled via UI plugin API".

Main reason for this is GWTP's URL token handling (ParameterTokenFormatter) that implies special treatment for characters such as '=' that are perfectly valid in search syntax. If we ever need to control search via WebAdmin URL, we can open a separate RFE.

Comment 12 Einav Cohen 2015-05-07 17:40:31 UTC
Vojtech - MODIFIED (patch merged)?

Comment 13 Vojtech Szocs 2015-05-11 15:20:43 UTC
(In reply to Einav Cohen from comment #12)
> Vojtech - MODIFIED (patch merged)?

Yes. Moving to MODIFIED.

Comment 14 Petr Matyáš 2016-02-04 13:00:22 UTC
Verified on 3.6.3-1


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