Skip to content

webadmin: add possibility for UI plugins to set hidden search string for lists#1004

Open
0ffer wants to merge 1 commit intooVirt:masterfrom
0ffer:hidden-search-filter-for-ui-plugins
Open

webadmin: add possibility for UI plugins to set hidden search string for lists#1004
0ffer wants to merge 1 commit intooVirt:masterfrom
0ffer:hidden-search-filter-for-ui-plugins

Conversation

@0ffer
Copy link
Contributor

@0ffer 0ffer commented Mar 17, 2025

It is useful for plugins that control displayed list models with search string. Configured string will be applied as hidden filter for each search request to the backend. And user can't change it by mistake if he need secondary filtration. It is important that hidden filter should be simple. If it has some or expressions then result filter(with user defined search string and tags) can return not expected results (because search string don't have any operation priority)

Are you the owner of the code you are sending in, or do you have permission of the owner?

[y/n] -> yes

@0ffer 0ffer requested a review from sgratch as a code owner March 17, 2025 13:49
@JasperB-TeamBlue JasperB-TeamBlue requested review from JasperB-TeamBlue, dupondje and sandrobonazzola and removed request for sgratch March 17, 2025 14:45
@0ffer 0ffer force-pushed the hidden-search-filter-for-ui-plugins branch from cbacd82 to 832257b Compare March 18, 2025 07:44
@0ffer
Copy link
Contributor Author

0ffer commented Mar 18, 2025

On local stand it can be checked within browser console.
Command example: pluginApi('ui-extensions').setHiddenSearchString('Vms:name=test-*')

And I prepared some short demo for this function:
ovirt-hidden-filter

…for lists

It is useful for plugins that control displayed list models with search string.
Configured string will be applied as hidden filter for each search request to the backend.
And user can't change it by mistake if he need secondary filtration.
It is important that hidden filter should be simple. If it has some `or` expressions then result filter(with user defined search string and tags) can return not expected results (because search string don't have any operation priority)

Signed-off-by: Stanislav Melnichuk <melnichuk.stas@gmail.com>
@0ffer 0ffer force-pushed the hidden-search-filter-for-ui-plugins branch from 832257b to ffbb931 Compare March 18, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant