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.
(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 ;)
> 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).
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.
User experience improvement, reopening.
Vojtech - status should be POST?
(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"?
(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.
Created attachment 1020709 [details] Test UI plugin
Attached test UI plugin (ui-plugins_1081028.tar.gz) to demonstrate the use of new "setSearchString" API.
Associated upstream patch http://gerrit.ovirt.org/#/c/40405 is verified and ready for merge.
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.
Vojtech - MODIFIED (patch merged)?
(In reply to Einav Cohen from comment #12) > Vojtech - MODIFIED (patch merged)? Yes. Moving to MODIFIED.
Verified on 3.6.3-1