[6.15.z] host_new>content>errata tab pagination #1202
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherrypick of PR: #1152
Purpose
Solution
-Added new method
clear()
toSearchInput
class (aigun/widgets.py)-usage in the airgun view like so
view.content.errata.searchbar.clear()
-Now using this in
apply_erratas()
method (entities/host_new.py), to clear the searchbar of any possible value present, when no search passed toapply_erratas()
, meaning show and apply all errata with a blank searchbar.-We also
clear
the searchbar inapply_erratas()
after installing, that way any search value passed does not persist in the searchbar.Issue, ResolvedWhen reading info from PF4Pagination object in views/host_new.py@362, we get an empty dictionary with no information. SolvedWhen the methodapply_erratas(entity, search)
is run, it will leave the searchbar filled, and keep it filled until the view is reset.Workaround: Before accessingview.content.errata.pagination
, we pass ' ' to searchbar, to display all available errata unfiltered. In case the searchbar was left occupied by a method run previously. I have been looking for a better way or built in method to clear the searchbar /unfilter, before geting pagination.