-
Notifications
You must be signed in to change notification settings - Fork 65
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
host_new>content>errata tab pagination #1152
Conversation
593616d
to
983af33
Compare
airgun/entities/host_new.py
Outdated
view.content.errata.select() | ||
# pass empty search to show any and all, | ||
# if a previous method left the searchbar filled | ||
view.content.errata.searchbar.fill(' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct this. We won't be applying the ' '
string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we made a new method to clear
the SearchInput searchbar (widgets.py), which was unintentionally left occupied by search
value passed to apply_erratas
method (host_new.py).
Now, we clear the searchbar after selecting and applying erratas by search, so that the passed search
does not persist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending @omkarkhatavkar comments
c85c011
to
95dd963
Compare
@damoore044 looks good can you take a look at pre-commit failures? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just fix the CI/CQ
1bf49f2
to
a4339e6
Compare
6c4ad18
to
4aae50c
Compare
Click button to clear searchbar docstring fix
4aae50c
to
9aac65b
Compare
Click button to clear searchbar docstring fix (cherry picked from commit 5b0ca76)
Click button to clear searchbar docstring fix (cherry picked from commit 5b0ca76)
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.