Created attachment 1724733 [details]
Description of problem:
Multi-page listing when adding repositories to Content Views confuses the number of repositories to add
Version-Release number of selected component (if applicable):
How reproducible: 100%
Steps to Reproduce:
1. Created a Content View.
2. Adding repositories to it.
List of repositories show up, 20 per page. I have two pages.
3. On the first page, "1 of 2", I mark the checkboxes of 3 repositories.
That goes well, it says "3 of 23 selected" (see screenshot 1).
Then I scroll down, and click next page in the repository list ">" to move on to "2 of 2". (screenshot 2)
4. On this second page of the list I mark an additional repository to be added
Satellite confirms this by saying "4 of 23 selected".
5. I click "Add repositories".
Only the last repository (selected on the second page) is added to the CV, but when I click then "List/Remove" to see the list of added repositories, the other 20 repos are not displayed at all. (screenshot 4).
Additionally: if I now navigate through the menu: "Menu --> Content --> Content Views --> $NAME_OF_CV --> Yum Content --> Repositories" then Satellite gos straight to the "Page 2" view of the repository lists ( https://satellite/content_views/2/repositories/yum/available?page=2&per_page=20 ) , which can be confusing.
All marked repositories on both pages 1 and 2 shall be added straight to the CV.
Workaround for the bug: Add first the repositories on page 1 of 2, then move on to page 2 of 2 and add the repositories from there. That worked just fine.
Created attachment 1724734 [details]
Created attachment 1724735 [details]
Created attachment 1724736 [details]
This page (and most selection pages) does not support a multi-page select. The real bug here is that the count is incorrect. Making this page support multi-select would probably be considered an enhancement. All of the content views section is being redesigned for satellite 7.0 or 7.1 release, although the new implementation is similar in that it doesn't support multi-page selection.
We can look at fixing the count
Created redmine issue https://projects.theforeman.org/issues/34670 from this bug
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34670 has been resolved.
Followed the steps in description.
All selected repos should be added to cv
All selected repos are added to cv.
Verified on 6.12.0 snap 2