Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 dupondje, sandrobonazzola and JasperB-TeamBlue 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 <[email protected]>
@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