Package search page not showing content views in Library
2 issues related to the same page
A) Content -> Packages page lets you search on various repositories, however once a package is selected for details the 'Repositories tab' does not fill the content view dropdown and instead shows "no content views"
B) Once A is fixed the search results do not accurately reflect what packages are available in the selected content view.
Steps for B
1. Create Lifecycle environments: Library, Dev
2. Create a yum repo and sync
3. Create a content view with the synced repo
4. Publish and Promote to both Library and Dev
5. Publish again but do not promote to Dev
6. Content -> Packages -> Identify and select the repo created in step 2 and
7. Click on a Package
8. Goto Repository tab and select the content view
9. Now notice the repository specified in 2 shows up for Library + CV
10. Change the Environment to Dev
The repository specified in 2 shows up for Dev + CV (Since we published and promoted version 1.0 of this CV to Dev)
Notice that the repository specified in 2 does NOT show up in dev.
Fixes #23141 - Package search not showing CV
Addressing 2 issues in this commit both dealing with the same page.
1) A filter issue in the Package Details -> Repository
page. The environment filter searches based on a id value for the
content view while the list it is searching against is a bunch of
content_view objects instead of id. This causes the filter to
always fail and return nil.
2) Also fixes the search query sent to the backend server when one is
filtering the objects. The search query previously did not the
environment into account when passing a content view version id matching
an environment. This commit tries to address that.